Gnuplot 将误差线填充为透明阴影

D. *_*b-G 2 transparency 2d gnuplot errorbar

在此处输入图片说明

大家好,

我输入数据为:

x(1),y(2),z(2)

x(2),y(2),z(2)

等等,

其中 x 和 y 值分别位于 x 轴和 y 轴上,z 值是误差线。从 Gnuplot 中,我如何重现图中多个图的误差条是透明的?

任何的想法?谢谢!

Eth*_*han 7

绘图样式with filledcurves可与 3 列输入数据一起使用以生成阴影区域。中心线必须单独绘制。Gnuplot 需要输入

x y1 y2

因此,如果您的数据采用 x、y、delta-y 的形式,您可以通过在说明using符中构造 y1 和 y2 来构造 gnuplot 命令

set term png truecolor  # or "set term pngcairo"
set output 'fill.png'
#
set style fill transparent solid 0.25 # partial transparency
set style fill noborder # no separate top/bottom lines
plot 'data' using 1:2 with lines lc "blue" title "Force", \
     'data' using 1:($2-$3):($2+$3) with filledcurves lc "blue" notitle, \
     'data' using ($1-Shift):2 with lines lc "green" title "Shift", \
     'data' using ($1-Shift):($2-$3):($2+$3) with filledcurves lc "green" notitle
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明