python - trouble with normal distribution -


i have code plot gaussian distribution not centered on 0 should be:

def gaussn(x):     return 1/(np.sqrt(2*np.pi))*np.exp(-0.5*x**2)  x=np.linspace(-5,5) gaus=gaussn(x) plt.plot(gaus) 

why centered on 25 , not 0?

try plt.plot(x,gaus) instead. not specifying x-axis, it's running 0 50 (i.e., length of array).


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -