I have several values of a function at different x points. I want to plot the mean and std in python, like the answer of this SO question. I know this must be easy using matplotlib, but I have no idea of the function's name that can do that. Does anyone know it?


plt.errorbarcan be used to plot x, y, error data (as opposed to the usualplt.plot)plt.errorbaraccepts the same arguments asplt.plotwith additionalyerrandxerrwhich default to None (i.e. if you leave them blank it will act asplt.plot).