I'm trying to plot last 24 hours from datafile. This data file has date/time and value
Below are the contents of datafile.dat:
2015-12-17-21:07:41,74.30
2015-12-17-21:08:41,74.10
2015-12-17-21:08:41,74.10
2015-12-30-21:08:41,79.10
2015-12-30-21:09:41,79.10
....
below gnuplot script
set datafile separator ","
set terminal png font arial 12 size 1000,600
set xdata time
set timefmt "%Y-%m-%d-%H:%M:%S"
set format x "%d/%m\n%H:%Mh"
set xrange [ time(0) - 86400 : time(0) ] # 86400 sec = 1 day
set grid
set output "/data/weather/humidity.png"
plot "datafile.dat" using 1:2 with lines smooth bezier title ""
As I don't have data in the file for day 29, why does gnuplot draw a line from day 29 to day 30? I don't have rows in the data file for day 29, and I'd like to not draw them. If I don't have 24 hours of data in the the file, I would like to draw just what I have.
How can I do that?
NaN. But probably you'll get problems with the smoothing, becausesmooth bezierplots a single bezier of order n-1through all n points. - Christoph