gpt4 book ai didi

plot - 带有误差条的 gnuplot 绘图

转载 作者:行者123 更新时间:2023-12-03 19:54:30 26 4
gpt4 key购买 nike

我的“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

yerrorbars

您可能需要烛台。这些通常是一个带有从顶部和底部延伸出的误差线的框,但是将最小值和最大值设置为相同应该可以为您提供所需大小的框:
plot "file.txt" using 1:($2-$3):($2-$3):($2+$3):($2+$3) with candlesticks

candlesticks

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com