2
我試圖繪製了我的數據集的擬合函數(COL 3與第7欄)以下地塊範圍在gnuplot的使用日期在x軸
28-08-1991 20-12-1992 24-04-1992 -263347200 -221875200 -242611200 0.060859
20-12-1992 02-09-1993 27-04-1993 -221875200 -199756800 -210816000 0.064681
10-09-1996 13-09-1997 13-03-1997 -104371200 -72576000 -88473600 0.095728 ......
我想我的劇本給定擬合線例如在1995年到2003年之間繪製適合的日期。從gnuplot處理2000年以來的日期,我無法獲得範圍函數。
請在下面找到我的代碼。
set xdata time
set timefmt "%d-%m-%Y"
set xrange ["01-01-1991":"01-01-2015"]
set yrange [0.0:0.4]
offset = 24*60*60
f(x) = 1.e-7*m*(x-offset)+c
fit f(x) "file" using 3:7 via m,c
set fit logfile 'file.log'
plot '(x < "24-02-1993") ? f(x) : 1/0' title "Best fit" with lines ls 5