我收到此错误:
line 0:all points y value undefined!
我的gnuplot代码是:
set terminal png 8;
set output "skript01_31/image10.png";
set timefmt x "%Y-%m-%d %H:%M:%S";
set xdata time;
set format x "%H:%M";
set xlabel "Cas";
set ylabel "Hodnota";
set yrange [:];
set xrange ["2009-05-11 07:30:00":"2009-06-11 00:34:00"];
set title "skript01";
set grid;
plot 'skript01_31/gnuplot_file' using 1:3 with points pt 7 ps 1 title "./skript01.sh";
我的数据文件:
[2009-05-11 07:30:00] 0
[2009-05-11 07:31:00] 0.00999983333416666468
[2009-05-11 07:32:00] 0.01999866669333307936
[2009-05-11 07:33:00] 0.02999550020249566076
[2009-05-11 07:34:00] 0.03998933418663415945
[2009-06-11 00:34:00] 0.05
我做错了什么?
感谢您的回答。
答案 0 :(得分:1)
对于时间格式,这应该是set timefmt x "[%Y-%m-%d %H:%M:%S]";
,并添加方括号以匹配数据文件中使用的时间格式。此外,xrange
变量还应获取额外的方括号以匹配:set xrange ["[2009-05-11 07:30:00]":"[2009-06-11 00:34:00]"];