Gnuplot smooth confidence interval lines as opposed to error bars

前端 未结 1 1319
死守一世寂寞
死守一世寂寞 2021-01-05 01:40

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 with

相关标签:
1条回答
  • 2021-01-05 02:23

    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

    enter image description here

    0 讨论(0)
提交回复
热议问题