You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
osx 10.10.5 python 2.7, matplotlib installed from github's setup.py
When I plot a histogram of small values, the normalize option doesn't work.
from matplotlib import pyplot as plt
import numpy as np
y = list(np.random.normal(.05,.003,100)) + list(np.random.normal(.03,.001,100))
plt.hist(y, normed=True)
plt.show()
The text was updated successfully, but these errors were encountered:
What do you expect to happen? This looks naively looks correct to me. The norm kwarg noramizes the probability density (docs), that is the integral of the histogram (not the sum) is 1
I think you can get the bins to sum to 1 if you pass in a weight vector of 1/n and drop the norm kwarg.
If you have any other follow up questions about this I suggest sending them to matplotlib-user@python.org (and you might have to sign up for the mailing list to post un-moderated).
osx 10.10.5 python 2.7, matplotlib installed from github's
setup.py
When I plot a histogram of small values, the normalize option doesn't work.
The text was updated successfully, but these errors were encountered: