Gnuplot中丢失的数据点

Gnuplot中丢失的数据点,gnuplot,Gnuplot,我有一个简单的时间序列: 2015-05-03 07:00,58 2015-05-03 08:00,61 2015-05-03 09:00,65 2015-05-03 10:00,69 2015-05-03 11:00,72 2015-05-03 12:00,74 2015-05-03 13:00,76 2015-05-03 14:00,78 2015-05-03 15:00,78 2015-05-03 16:00,78 2015-05-03 17:00,77 2015-05-03 18:00,

我有一个简单的时间序列:

2015-05-03 07:00,58
2015-05-03 08:00,61
2015-05-03 09:00,65
2015-05-03 10:00,69
2015-05-03 11:00,72
2015-05-03 12:00,74
2015-05-03 13:00,76
2015-05-03 14:00,78
2015-05-03 15:00,78
2015-05-03 16:00,78
2015-05-03 17:00,77
2015-05-03 18:00,76
2015-05-03 19:00,73
2015-05-03 20:00,70
2015-05-03 21:00,67
2015-05-03 22:00,66
2015-05-03 23:00,64
2015-05-04 00:00,63
2015-05-04 01:00,62
2015-05-04 02:00,62
2015-05-04 03:00,61
2015-05-04 04:00,61
2015-05-04 05:00,60
2015-05-04 06:00,60
使用:

reset

set terminal pngcairo enhanced background "#000000" font "Arial,10" size 600,200 truecolor
dataFileForecast = "/Users/.../Dropbox/Public/hourlyForecast.csv"
set datafile separator ','
stats dataFileForecast using 2 nooutput

freezeWarning = 32
Yhigh = (STATS_mean * 1.5)
Ylow = (STATS_mean - (STATS_mean * 0.5))

set timefmt "%Y-%m-%d %H:%M"
set output "/Users/.../Dropbox/Public/hourlyForecast.png"

set tics tc rgb "#666666"
set border lt rgb "#666666"
set boxwidth 0.25 relative

set style fill transparent solid 0.4
set style line 1 lt rgb "#666666" lw 1 pt 6
set style line 2 lt rgb "#0000FF" lw 1 pt 6

unset key
unset mxtics
set xdata time 
set xtics format "%H:%M"
set ytics format "%2.0f"
set yrange [Ylow:Yhigh] 

plot dataFileForecast using 1:2 every ::1 title column with filledcurve above y1=0 ls 1,\
     dataFileForecast using 1:2:2 every ::1 with labels offset 0,1 tc "#FFFFFF" font "Lato-Light,8",\
     freezeWarning with filledcurve above y1=0 ls 2
工作正常,但由于某种原因,我丢失了第一个数据点(绘图应从07:00开始,并显示24个数据点):

我不知道如何让绘图从第一个数据点开始。(完成后,我真正想做的是在两侧放置一个1小时的缓冲区——换句话说,让xrange为[dataPoint1-(60*60):dataPoint24+(60*60)]

任何帮助都将不胜感激


Dave

使用
标题列
告诉gnuplot使用第一行作为关键标题。这样,第一行被跳过用于绘图。然后,
every::1
部分也将跳过第一行。删除这两行,您将获得预期的绘图

要将X范围向每侧扩展1小时,请使用
set offset 60*60,60*60,0,0
set autoscale xfix

reset

set terminal pngcairo enhanced background "#000000" font "Arial,10" size 600,200 truecolor
dataFileForecast = "test.dat"
set datafile separator ','
stats dataFileForecast using 2 nooutput

freezeWarning = 32
Yhigh = (STATS_mean * 1.5)
Ylow = (STATS_mean - (STATS_mean * 0.5))

set timefmt "%Y-%m-%d %H:%M"
set output "test.png"

set tics tc rgb "#666666"
set border lt rgb "#666666"
set boxwidth 0.25 relative

set style fill transparent solid 0.4
set style line 1 lt rgb "#666666" lw 1 pt 6
set style line 2 lt rgb "#0000FF" lw 1 pt 6

unset key
unset mxtics
set xdata time 
set xtics format "%H:%M"
set ytics format "%2.0f"
set yrange [Ylow:Yhigh]
set autoscale xfix
set offsets 60*60,60*60,0,0

plot dataFileForecast using 1:2 with filledcurve above y1=0 ls 1,\
     dataFileForecast using 1:2:2 with labels offset 0,1 tc "#FFFFFF" font "Lato-Light,8",\
     freezeWarning with filledcurve above y1=0 ls 2

当然!谢谢。我从另一个有标题行的情节中提取了代码,然后是颜色行。我知道是这样的。太棒了!——非常感谢。