绘制误差线(百分位)

ely*_*ely 1 matplotlib percentile

我对 python 很陌生,我需要一些帮助。我想在我的图上绘制相当于 1sigma 标准差的误差线作为分布的第 16 个和第 84 个百分位值。我尝试过(使用 matplotlib):

err=np.std(x)
Run Code Online (Sandbox Code Playgroud)

但它只是给了我标准偏差。谢谢。

tac*_*ell 5

如果你想要垂直误差线

 ax = plt.gca()
 ax.errorbar(x, y, yerr=np.vstack([error_low, error_high]))
 plt.draw()
Run Code Online (Sandbox Code Playgroud)

其中error_lowerror_high是长度相同的一维序列 anxy。误差线绘制在y[i] - error_low[i]和 处y[i] + error_high[i]

matplotlib 只是绘制你告诉它的内容,提供语义是你的工作。

errorbar 文件