大家好,
我的输入数据为:
x(1),y(2),z(2)
x(2),y(2),z(2)
等等,
其中 x 和 y 值分别位于 x 轴和 y 轴上,z 值是误差线。 从 Gnuplot 中,我如何重现该图,其中多个图的误差线是透明的?
有什么想法吗? 谢谢!
最佳答案
withfilledcurves
绘图样式可与 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
关于2d - Gnuplot 将误差线填充为透明阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55550938/