在 Gnuplot 中使用方程式添加误差线

Adding error bars using equation in Gnuplot

我有一个传感器数据,我知道我的数据突然变得准确了:

我的问题是:如何将 y 误差线添加到我现有的代码中?

set xlabel "Time [min]" 
set ylabel "Temperature [Celsius]"
plot '150830AW.dat'  every ::1188::1231 using 4:52 w l lc rgb 'green' title "Run 1", \
    '150830AW.dat'  every ::1251::1284 using 4:52 w l lc rgb 'blue' title "Run 2", \
                        90 title "Standard" with lines linestyle 2

set xlabel "Time [min]"
set ylabel "Pressure [MPa]"
plot '2015 08 30 0000 Pelletizer Feed (Wide).dat'  every ::2372::2459 using 4:(*0.006894759086775369) w l lc rgb 'green' title "Run 1", \
    '2015 08 30 0000 Pelletizer Feed (Wide).dat'  every ::2498::2565 using 4:(*0.006894759086775369) w l lc rgb 'blue' title "Run 2"

看看这些演示:errorbars。基本上你需要第三列错误。

由于您的压力精度为 0.5%,因此您必须将压力列乘以 0.005,这样您的 using 4:52 将变为 using 4:52:(*0.005)

要激活错误栏,您需要将 w l(即用线条)替换为 with errorbars

如果你想要行 errorbars 你必须保留你的行并添加这个新行,例如:

plot '150830AW.dat'  every ::1188::1231 using 4:52 w l lc rgb 'green' title "Run 1", \
     ''  every ::1188::1231 using 4:52:(*0.005) w errorbar lc rgb 'green' notitle, \
     '150830AW.dat'  every ::1251::1284 using 4:52 w l lc rgb 'blue' title "Run 2", \
     ''  every ::1251::1284 using 4:52:(*0.005) w errorbar lc rgb 'blue' notitle, \
     90 title "Standard" with lines linestyle 2

如果您想要更好的恕我直言,请查看 fill between curves