Reputation: 779
I have created a script that logs various system resources, and will graph all data points into gnuplot with a nice smooth line. I am running into issues with gnuplot using my time format and plotting the data correctly. A sample of my data file is below
My time format = %H%M%S
"etc. etc." = hundreds of additional recorded times.
170554 3.0%
170556 2.7%
170558 2.6%
etc.
etc.
010218 2.1%
010218 2.3%
If the time of all data plots does not go over the 000000 mark, gnuplot graphs everything correctly. Once my data plots go over that 000000 boundary, gnuplot counts backwards in my time format, so it tries to plot everything that has not been recorded from 170554 - 010218 (numbers not recorded). Example. 170552 160424 150720 120818.
My gnuplot command I am using is below.
gnuplot -persist -e "set title 'Resource Monitor'; set timefmt '%H%M%S'; set xdata time; set xlabel 'TIME'; set ylabel 'PERCENT'; set yrange [0:101]' set xrange ['170554':'010218']" -e "plot 'log_file' using 1:2 title 'CPU' smooth Bezier"
So my question is... Why is gnuplot not plotting my graph correctly (the way I want it to via time) and how can I fix this issue? Thank you.
Upvotes: 0
Views: 188
Reputation: 2456
From the documentation
If
<ub>
is lower than<lb>
the constraints will be turned off and full autoscaling will happen.
To fix it, you will need to supplement your time data with additional "day" information, or find some other way to ensure that later times are never "lower than" earlier times.
Upvotes: 1