Gnuplot平滑置信区间线,而不是误差线 [英] Gnuplot smooth confidence interval lines as opposed to error bars

查看:576
本文介绍了Gnuplot平滑置信区间线,而不是误差线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在数据行上下有一个95%的置信区间线,而不是每个点的垂直线。

有没有办法让我可以做到这一点在gnuplot没有绘制另一条线?或者我需要绘制另一行,然后适当地标记它?

解决方案

您可以使用 filledcurves 风格来填补95%信心的区域。考虑示例数据文件 data.dat 的内容:

 # 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

用剧本绘制

  set style fill tr​​ansparent solid 0.2 noborder 
使用1:3:4填充曲线标题'95%置信度',\
''使用1:2与lp <1 pt 7 ps 1.5 lw 3标题'平均值'

得到



< img src =https://i.stack.imgur.com/DOAWS.pngalt =在这里输入图片描述>


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

这篇关于Gnuplot平滑置信区间线,而不是误差线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆