gnuplot 5.0.3中的xrange问题

gnuplot 5.0.3中的xrange问题,gnuplot,Gnuplot,我有一个输入文件E3,数据排列如下: 01/01/2020 00:00 15 0 39 01/01/2020 00:01 3 4 64 01/01/2020 00:02 0 24 9 ... 01/07/2020 11:53 13 0 0 01/07/2020 11:54 19 2 20 01/07/2020 11:55 2 0 2 我试图用以下代码绘制它: set terminal x11 size 1900, 800 set term x11 1 noraise set grid set

我有一个输入文件E3,数据排列如下:

01/01/2020 00:00 15 0 39
01/01/2020 00:01 3 4 64
01/01/2020 00:02 0 24 9
...
01/07/2020 11:53 13 0 0
01/07/2020 11:54 19 2 20
01/07/2020 11:55 2 0 2
我试图用以下代码绘制它:

set terminal x11 size 1900, 800
set term x11 1 noraise
set grid
set xlabel font "Times Roman, 22"
set xlabel "Date\nTime"
set xdata time
set timefmt "%m/%d/%Y %H:%M"
set xrange [ "01/01/2020 00:00" : "01/07/2020 11:55" ]
set format x "%m/%d\n%H:%M"
set xtics time
set y2label font "Times Roman, 22"
set y2label "Events"
set ytics 10
set y2tics 10
set key left top
plot './E3' using 0:3 with lines title "Delete" ls 15, './E3' using 0:4 with lines title "Failed" ls 4, './E3' using 0:5 with lines title "Update" ls 6
pause  -1
当我试图让gnuplot运行上述命令时,它返回以下错误:

plot './E3' using 0:3 with lines title "Delete" ls 15, './E3' using 0:4 with lines title "Failed" ls 4, './E3' using 0:5 with lines title "Update" ls 6

                                                    ^
"enum.gnu.1", line 18: all points y value undefined!
注释掉设置的xrange可以消除错误。但是,在绘图中,x轴上的TIC为01/01\n00:00、01/01\n00:15。。。01:01\n02:45-这不是我想要的。我想要的是每天有一个x tic,对应于1440个数据点,每个tic都标有日期和时间。即01/01\n00:00,01/02\n00:00。。。01/07\n00:00


我做错了什么?

首先,为什么要绘制列
0
,而不是
1
? 接下来,数据/时间以秒为单位进行内部计数。因此,如果你想每天有一次tic,你必须将它设置为
60*60*24
seconds

如果您更改以下行,它应该可以工作:

set xtics 60*60*24 time


很高兴它起作用了。如果此答案有帮助或解决了您的问题,请将其标记为有帮助或解决了您的问题。
plot $Data using 1:3 with lines title "Delete" ls 15, \
     '' using 1:4 with lines title "Failed" ls 4, \
     '' using 1:5 with lines title "Update" ls 6