Labels

Wednesday, July 10, 2019

Tricks on ploting figure with matplotlib

plot error-bar and upper limit

# lower & upper limits of the error
lolims = np.array([0, 0, 1, 0, 1, 0, 0, 0, 1, 0], dtype=bool)
uplims = np.array([0, 1, 0, 0, 0, 1, 0, 0, 0, 1], dtype=bool)

ax.errorbar(x, y + 2.1, xerr=xerr, yerr=yerr,
            xlolims=xlolims, xuplims=xuplims,
            uplims=uplims, lolims=lolims,
            marker='o', markersize=8,
            linestyle='none')



plt.legend(frameon=False)









Reference:
https://matplotlib.org/3.1.0/gallery/statistics/errorbar_limits.html

No comments:

Post a Comment