Reputation: 788
I am trying to plot the data set below by using the gnuplot options set xdata time; set timefmt "%m/%d %H:%M:%S"; set datafile separator "-"; set format x "%m-%d\n%H:%M"
05/23 23:56:00-16
05/23 23:57:00-12
05/23 23:58:00-18
05/24 23:59:00-12
05/24 00:00:00-16
05/24 00:01:00-22
05/24 00:02:00-18
05/24 00:03:00-15
05/24 00:04:00-16
05/24 00:05:00-16
05/24 00:06:00-16
05/24 00:07:00-14
05/24 00:08:00-12
05/24 00:09:00-14
05/24 00:10:00-14
05/24 00:11:00-14
05/24 00:12:00-12
05/24 00:13:00-16
05/24 00:14:00-12
05/24 00:15:00-17
However, when I run the plot command as plot "stats.log" using 1:2 with lines
, I get the following graph. The strange jump in the graph seems to occur for the period between 05/25 00:00:00 - 00:09:00, if I delete it, the graph is drawn as expected. Adding <sort
to the plot command shifts this data set to the end of the graph but this isn't what I want.
Is there any idea about how to fix this?
Upvotes: 1
Views: 97
Reputation: 4218
I think you have one wrong data point:
...
05/23 23:58:00-18 # correct
05/24 23:59:00-12 # wrong day, should be 05/23 ...
05/24 00:00:00-16 # correct
...
Upvotes: 3