Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:02:55+00:00 2026-06-10T10:02:55+00:00

I want gnuplot to plot an irregular timeseries as bars, but my bars are

  • 0

I want gnuplot to plot an irregular timeseries as bars, but my bars are always placed at day boundaries (the midnight marks), as if the time info were ignored (e.g. the first two entries show up on top of each other at midnight). The days are spaced widely enough, it’s not an issue of the bars being too scrunched up. Sample data:

07/09/2012-00:00 1 741 0.50
07/09/2012-12:00 2 3087 0.50
07/12/2012-00:00 1 2011 0.33
07/12/2012-08:00 2 814 0.33
07/12/2012-16:00 2 99 0.33

The relevant gnuplot code below. The xtics settings are just for aesthetics, they have no bearing on the issue.

set xdata time
set timefmt "%m/%d/%y-%H:%M"
set xtics format "%m/%d"
set xtics "07/08/2012-00:00", 2*172800 ,"08/28/2012-00:00"
plot FILE using 1:3:2 with boxes lc variable

Two separate, but related questions: 1) Can I remove the leading zeros from x-axis labels (i.e 7/8, not 07/08) to save space (“%m” and “%d” always give me leading zeros)? 2) Can I vary the width of a bar based on data from file (in this case, I’d like the 4th column to be a fractional multiplier for the standard bar width)? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:02:56+00:00Added an answer on June 10, 2026 at 10:02 am

    Your time format is wrong. you want %Y (4-digit year) instead of %y (2-digit year).

    In order to specify the width, you’ll need 4 columns of data:

    plot FILE using x_column:y_column:x_width:linestyle w boxes lc variable
    

    where x_width is the width of the box in seconds (since that is the unit on a time-axis).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to plot multiple rowstacked histograms on the same graph using gnuplot. A
I have a data file which I want to plot with gnuplot. However, for
I want to plot multiple bounded functions in gnuplot. I.e. plot x from 0
I want a radial(polar) plot using gnuplot (i.e in circular co-ordinate system(r,theta). Here I
I have the following file I want to plot using gnuplot bar graphs: Function
Want the function to sort the table by HP but if duplicate HPs then
My program generates bash scripts that call gnuplot. I don't want to have to
Want to attach an Event Handler/Listener to some links using the delegate() method, but
Want to know in detail about the purpose of the info Command in redis
I made a plot in R and I want to repeat all the commands

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.