Will not
import matplotlib.pyplot as plt x = [100, 200, 300, 400] y = [100, 200, 300, 400] xerr = [100, 100, 100, 100] yerr = [20, 20, 20, 20] plt.errorbar(x, y, xerr, yerr, ls='none') plt.show()
mean error bars are on wrong axes?
pyplot.errorbar :
matplotlib.pyplot.errorbar(x, y, yerr=None, xerr=None, fmt=u'', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, capthick=None, hold=None, **kwargs)
Note that yerr precedes xerr, so
plt.errorbar(x, y, xerr, yerr, ls='none')
makes your error bars in the reverse order - yerr = xerr, xerr = yerr. Good time to use named args:
plt.errorbar(x, y, xerr=xerr, yerr=yerr, ls='none')