0
我對Python很新,我需要一些幫助。我想繪製等於我圖上1sigma標準偏差的誤差線,作爲分佈的第16和第84百分位值。我試着用(使用matplotlib):繪圖錯誤欄(百分點)
err=np.std(x)
,但它只是給我的標準偏差。 謝謝。
我對Python很新,我需要一些幫助。我想繪製等於我圖上1sigma標準偏差的誤差線,作爲分佈的第16和第84百分位值。我試着用(使用matplotlib):繪圖錯誤欄(百分點)
err=np.std(x)
,但它只是給我的標準偏差。 謝謝。
如果你想垂直誤差條
ax = plt.gca()
ax.errorbar(x, y, yerr=np.vstack([error_low, error_high]))
plt.draw()
其中error_low
和error_high
是相同長度的x
和y
的1D序列。誤差棒繪製在y[i] - error_low[i]
和y[i] + error_high[i]
。
matplotlib
只是畫出你告訴它的內容,提供語義是你的工作。
您加入您指定的值的誤差欄上,'matplotlib'不僅圖紙,它不會做語義(也就是你的工作;))。 – tacaswell 2013-02-25 16:47:03
當然!坦克很多! – ely 2013-02-25 17:45:52
查看[scoreatpercentile](http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.scoreatpercentile.html) – 2013-02-26 15:03:12