Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';不要让gnuplot填充到下面的行中_Gnuplot - Fatal编程技术网

Can';不要让gnuplot填充到下面的行中

Can';不要让gnuplot填充到下面的行中,gnuplot,Gnuplot,我正试图让OSX10.10.3下的gnuplot 5.0填充图中较低系列下面的蓝色。我已经尝试了很多不同的线条dataFileForecast,使用1:4,填充曲线高于y1=0 linestyle 3,但似乎没有任何效果 以下是消息来源: #!/opt/local/bin/gnuplot reset set terminal pngcairo enhanced background "#000000" font "Lato-Light,20" linewidth 1 rounded size

我正试图让OSX10.10.3下的gnuplot 5.0填充图中较低系列下面的蓝色。我已经尝试了很多不同的线条
dataFileForecast,使用1:4,填充曲线高于y1=0 linestyle 3
,但似乎没有任何效果

以下是消息来源:

#!/opt/local/bin/gnuplot
reset

set terminal pngcairo enhanced background "#000000" font "Lato-Light,20" linewidth 1 rounded size 2048,670
set output "10DayForecast.png"
dataFileForecast = "10DayForecast.csv"
set datafile separator ','
set timefmt "%Y-%m-%d"
stats dataFileForecast using 2:4 nooutput

freezeWarning = 32.
Yhigh = STATS_max_x + 10.
Ylow = STATS_min_y - 10.

unset key
set border linetype rgb "#666666"
set boxwidth 0.25 relative
set style fill transparent solid 0.4
set style line 1 linetype rgb "#0066CC" # freeze line
set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5 # points for both high and low temp
set style line 3 linetype rgb "#000077" # fill for low temp
set style line 4 linetype rgb "#FFFF00" # rain forecast
set style line 5 linetype rgb "#770000" # fill for high temp
set style line 6 linetype rgb "#FF7777" # line for high temp
set style line 7 linetype rgb "#3377FF" # line for low temp

set label "°" right

unset mxtics
set tics textcolor rgb "#666666"

# X Axis
set xdata time 
set xtics format "%a" nomirror
set autoscale xfix
set offsets 12*60*60,12*60*60,0,0

# Y Axis
set yrange [Ylow:Yhigh]
unset ytics
if (32 > Ylow) set ytics 32,1,32 tc rgb "#FFFFFF" font ",18"
set ytics format "%2.0f°" nomirror

# Y2 Axis
set y2tics format "%2.0f%%" textcolor "#FFFF00" nomirror
set y2range [0:100]

plot dataFileForecast using 1:6 with impulses linestyle 4 axes x1y2,\
    dataFileForecast using 1:2:4 with filledcurves above linestyle 5,\
    dataFileForecast using 1:2 with lines linestyle 6,\
    dataFileForecast using 1:2 with points linestyle 2,\
    dataFileForecast using 1:2:3 with labels offset 1.75,0.5 textcolor "#FFFFFF" font ",18",\
    dataFileForecast using 1:4 with filledcurves above y1=0 linestyle 3,\
    dataFileForecast using 1:4 with lines linestyle 7,\
    dataFileForecast using 1:4 with points linestyle 2,\
    dataFileForecast using 1:4:5 with labels offset 1.75,0.5 textcolor "#FFFFFF" font ",18",\
    freezeWarning with filledcurve above y1=0 linestyle 1
这是一个数据文件:

2015-06-29,94,94°,69,69°,20.0
2015-06-30,99,99°,72,72°,0.0
2015-07-01,102,102°,73,73°,0.0
2015-07-02,96,96°,69,69°,0.0
2015-07-03,94,94°,68,68°,10.0
2015-07-04,92,92°,67,67°,0.0
2015-07-05,91,91°,63,63°,0.0
2015-07-06,91,91°,62,62°,0.0
2015-07-07,91,91°,61,61°,0.0
2015-07-08,91,91°,63,63°,0.0

我遗漏了什么?

我不确定,为什么这不起作用。可能是个虫子。作为解决方法,您可以使用语句在
中给出第三列,以指示填充区域的下边界:

plot ...,\
    dataFileForecast using 1:4:(0) with filledcurves linestyle 3
这给出了输出


如果Y范围包括此区域,则正确绘制了冻结警告区。

谢谢。我想这可能是5.0中的一个bug。我看到有一个5.0.1。一旦这在MacPorts中可用,我将尝试一下。看起来确实,这应该在5.0.1中修复。包含一条线
修复打印样式填充曲线中的破损{over | down}y1=
。我目前无法测试,但看起来不错。