Weather data displayed with gnuplot

时间:2016-10-09 15:52:09

标签: gnuplot

i'm currently trying to plot weather data with gnuplot using a text document containing a utc timestamp in the first column, and the temperature in the second and third.

set term png size 1920,660 set output "Today.png" set datafile missing '0' set ylabel "Temperature" set grid ytics set timefmt "%s" set format x "%H:%M:%S" set xdata time set xtics rotate plot "Data.dat" using 1:2 with lines lt rgb "red" t "Inside", "Data2.dat" using 1:3 with lines lt rgb "blue" t "Outside"

This is working and displaying the graphs except for one thing: The data is automatically updated every couple hours. So when creating the image at 10 am it will display data from 0-10 am. Instead I want it to always display one complete day at a time, so over the course of the day, you can see the graph "grow" from left to right.

I tried inserting the following code:

set xrange ["00:00:00":"23:59:59"]

but it does not display anything then.

Any suggestions on how to accomplish that?

0 个答案:

没有答案