Gnuplot Confidence Interval Lines, Not Error Bars

I need a confidence line 95% above and below my data line - as opposed to the vertical bars at each point.

Is there a way I can do this in gnuplot without building another line? Or do I need to build another line and then mark it accordingly?

+6
source share
1 answer

You can use the filledcurves style to fill the area with 95% confidence. Consider an example data.dat data data.dat with the contents:

 # xy 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 build it with a 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 obtain

enter image description here

+8
source

Source: https://habr.com/ru/post/974389/


All Articles