I'd like a 95% confidence interval line above and below my data line - as opposed to vertical bars at each point.
Is there a way that I can do this in gnuplot without plotting another line? Or do I need to plot another line and then label it appropriately?
You can use the filledcurves
style to fill the region of 95% confidence. Consider the example data file data.dat
with the content:
# x y ylow yhigh
1 3 2.6 3.5
2 5 4 6
3 4 3.2 4.3
4 3.5 3.3 3.7
and plot this with the script
set style fill transparent solid 0.2 noborder
plot 'data.dat' using 1:3:4 with filledcurves title '95% confidence', \
'' using 1:2 with lp lt 1 pt 7 ps 1.5 lw 3 title 'mean value'
to get
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With