GNUPLOT 5:使用timefmt横坐标的条件打印

GNUPLOT 5:使用timefmt横坐标的条件打印,time,conditional,gnuplot,Time,Conditional,Gnuplot,我很难使用gnuplot 5.0 patchlevel 6将条件绘图应用于带有TimeFinder横坐标的数据 我试图绘制ASCII文件的内容,该文件包含两列: 2016-12-01 12 2017-01-01 1 2017-02-01 2 2017-03-01 3 2017-04-01 4 2017-05-01 5 2017-06-01 6 因此,我只提出: set timefmt "%Y-%m-%d" set xdata time p 'file.

我很难使用gnuplot 5.0 patchlevel 6将条件绘图应用于带有TimeFinder横坐标的数据

我试图绘制ASCII文件的内容,该文件包含两列:

2016-12-01    12
2017-01-01    1
2017-02-01    2
2017-03-01    3
2017-04-01    4
2017-05-01    5
2017-06-01    6
因此,我只提出:

set timefmt "%Y-%m-%d"
set xdata time
p 'file.dat' u 1:2 w l, '' u 1:($1>strptime("%Y-%m-%d","2017-03-01")?$2:10) w p
我希望绘图看起来像第二列后面的一条线和一系列点,沿着最后三个横坐标的线,或者在前三个横坐标处标记值10


实际上,所有的分数都是10。你知道发生了什么事吗?非常感谢。

使用
timecolumn

p 'file.dat' u 1:2 w l, '' u 1:(timecolumn(1, "%Y-%m-%d")>strptime("%Y-%m-%d", "2017-03-01") ? column(2) : (10)) w p