I\'m trying to plot normed histogram, but instead of getting 1 as maximum value on y axis, I\'m getting different numbers.
For array k=(1,4,3,1)
import
One way is to get the probabilities on your own, and then plot with plt.bar:
plt.bar
In [91]: from collections import Counter ...: c=Counter(k) ...: print c Counter({1: 2, 3: 1, 4: 1}) In [92]: plt.bar(prob.keys(), prob.values()) ...: plt.show()
result: