Gnuplot曲线之间的透明阴影区域
我有一个包含平均值和标准偏差列的数据集。我可以在均值上下绘制均值+西格玛和均值-西格玛曲线。现在我想在+-sigma之间加上阴影,但仍然可以看到平均曲线。我尝试了下面的透明设置,但仍然没有成功Gnuplot曲线之间的透明阴影区域,gnuplot,Gnuplot,我有一个包含平均值和标准偏差列的数据集。我可以在均值上下绘制均值+西格玛和均值-西格玛曲线。现在我想在+-sigma之间加上阴影,但仍然可以看到平均曲线。我尝试了下面的透明设置,但仍然没有成功 set style fill transparent solid 0.5 noborder plot 'inter.dat' using 1:2 with linespoints lc "black", \ 'inter.dat' using 1:($2-$3) with linespo
set style fill transparent solid 0.5 noborder
plot 'inter.dat' using 1:2 with linespoints lc "black", \
'inter.dat' using 1:($2-$3) with linespoints lc "blue", \
'inter.dat' using 1:($2+$3) with linespoints lc "blue", \
'inter.dat' using 1:($2-$3):($2+$3) with filledcurves lc "skyblue" fs solid 0.5
样本数据:
0.490 -5.809 +2.203
0.500 -1.293 +1.370
0.520 -1.026 +0.979
0.530 -0.877 +0.961
0.540 -0.656 +0.937
0.550 -0.878 +0.923
0.560 -0.649 +0.876
0.570 -0.729 +0.859
0.580 -0.370 +0.771
0.590 -0.421 +0.710
非常感谢您的反馈。您在第一个fillstyle声明中指定了
透明
,但实际上在plot命令中覆盖了它。你可以做任何一件事
set style fill transparent solid 0.5 noborder
plot 'inter.dat' using 1:2 with linespoints lc "black", \
'inter.dat' using 1:($2-$3) with linespoints lc "blue", \
'inter.dat' using 1:($2+$3) with linespoints lc "blue", \
'inter.dat' using 1:($2-$3):($2+$3) with filledcurves lc "skyblue"
或
得到
此外,请记住,并非所有终端都支持透明度;上面的图像是使用
pngcairo
生成的,到pngcairo的输出正常。但是屏幕xterm看起来很糟糕,没有透明度。xterm驱动程序可能有问题。我认为X
终端不支持透明,但交互式wxt
和qt
终端支持透明。如果您一直使用X
,解决方法可能是首先绘制填充区域,然后在其顶部绘制平均曲线的线。
plot 'inter.dat' using 1:2 with linespoints lc "black", \
'inter.dat' using 1:($2-$3) with linespoints lc "blue", \
'inter.dat' using 1:($2+$3) with linespoints lc "blue", \
'inter.dat' using 1:($2-$3):($2+$3) with filledcurves lc "skyblue" fs transparent solid 0.5