Note

Go to the endto download the full example code.

Errorbar function#

This exhibits the most basic use of the error bar method.In this case, constant values are provided for the errorin both the x- and y-directions.

importmatplotlib.pyplotaspltimportnumpyasnp# example datax=np.arange(0.1,4,0.5)y=np.exp(-x)fig,ax=plt.subplots()ax.errorbar(x,y,xerr=0.2,yerr=0.4)plt.show()
errorbar

Tags:plot-type: errorbardomain: statistics

References

The use of the following functions, methods, classes and modules is shownin this example:

Gallery generated by Sphinx-Gallery