gnuplot xrange没被正确接受?

时间:2015-06-22 11:48:45

标签: gnuplot

我有一个大的(80MB +)输入文件,其中包含这样的示例(第一列中的时间戳是UNIX-epoch,毫秒):

1433908383.289  25219.334734712 25219.946173616 9.512001270e-06 1.003999932e-05 9.512001270e-06 1.003999932e-05 0.000000000e+00 0.000000000e+00
1433908383.336  25219.364742792 25219.985225320 9.528001101e-06 1.003999932e-05 9.528001101e-06 1.003999932e-05 0.000000000e+00 0.000000000e+00
1433908383.362  25219.399744192 25220.016488160 9.512001270e-06 1.003199941e-05 9.512001270e-06 1.003199941e-05 0.000000000e+00 0.000000000e+00
1433908383.386  25219.429734824 25220.039910600 9.504001355e-06 1.003999932e-05 9.504001355e-06 1.003999932e-05 0.000000000e+00 0.000000000e+00

当使用以下脚本绘制时:

set terminal pngcairo enhanced font "arial,10" size 1024, 768;
set key below;
set grid;

set xdata time;
set timefmt "%H:%M:%S";
set format x "%H:%M:%S";
set datafile separator "\t";
set xlabel "Time (UTC)";
set ylabel "seconds";

set datafile nofpe_trap;

plot "data.tsv" using ($1-946684800):6 with points linecolor rgbcolor "#EE0000" axes x1y1 title "plot 1";

生成以下图表:

但是当我在plot命令之前添加以下内容时:

set xrange ["10:00:00","11:00:00"]

我没有得到任何输出和以下错误:

gnuplot> plot "data.tsv" using ($1-946684800):6 with points linecolor rgbcolor "#EE0000" axes x1y1 title "plot 1";
                                                                                                                ^
     line 0: all points y value undefined!

我已匹配timefmt,此范围内有明显的数据。那是什么给出了什么?

注意:这是gnuplot 4.4,下图中的轴标签错误,因为我最初在纪元偏移中遗漏了8

1 个答案:

答案 0 :(得分:1)

当我提供数字时间戳作为范围时,这是有效的,尽管我的timefmt看起来像人类可读的时间字符串:

set xrange [1444122000:1433928600]
相关问题