python - Plot mean and standard deviation -


i have several values of function @ different x points. want plot mean , std in python, answer of this question. know must easy using matplotlib, have no idea of function's name can that. know it?

enter image description here

plt.errorbar can used plot x, y, error data (as opposed usual plt.plot)

import matplotlib.pyplot plt import numpy np  x = np.array([1, 2, 3, 4, 5]) y = np.power(x, 2) # y = x**2 e = np.array([1.5, 2.6, 3.7, 4.6, 5.5])  plt.errorbar(x, y, e, linestyle='none', marker='^')  plt.show() 

plt.errorbar accepts same arguments plt.plot additional yerr , xerr default none (i.e. if leave them blank act plt.plot).

example plot


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -