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
You could use the solution outlined here:
weights = np.ones_like(myarray)/float(len(myarray)) plt.hist(myarray, weights=weights)