我的“ file.txt”文件中的数据如下所示(显示了示例行)

31 1772911000 6789494.2537881


请注意,第二列是平均值,第三列是
输入样本。因此,对于误差线,我需要在x轴值31处的误差线,误差线的起点是(第二列值)-(第三列值),结束于(第二列值)+(第三列值) )。我尝试了以下方法:

plot "file.txt" using ($1-$2):1:($2+$1) with errorbars


但是结果是不合适的。有什么帮助吗?

最佳答案

您需要x:y:err,所以尝试

plot "file.txt" using 1:2:3 with yerrorbars


plot - 带有错误栏绘制的gnuplot-LMLPHP

您可能需要烛台。这些通常是一个带有误差线的框,误差线从顶部和底部延伸出来,但是将最小值和最大值设置为相同,应该会为您提供所需大小的框:

plot "file.txt" using 1:($2-$3):($2-$3):($2+$3):($2+$3) with candlesticks


plot - 带有错误栏绘制的gnuplot-LMLPHP

关于plot - 带有错误栏绘制的gnuplot,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10684182/

10-11 23:02
查看更多