Plot error bars (percentile)

后端 未结 1 1831
深忆病人
深忆病人 2021-01-25 11:52

I\'m quite new to python and I need some help. I would like to plot errorbars equivalent to 1sigma standard deviations on my plot as the 16th and 84th percentile values of the d

相关标签:
1条回答
  • 2021-01-25 12:35

    If you want vertical error bars

     ax = plt.gca()
     ax.errorbar(x, y, yerr=np.vstack([error_low, error_high]))
     plt.draw()
    

    where error_low and error_high are 1D sequences of the same length an x and y. The error bars are drawn at y[i] - error_low[i] and y[i] + error_high[i].

    matplotlib just draws what you tell it to, it is your job to provide the semantics.

    errorbar documentation

    0 讨论(0)
提交回复
热议问题