myarray = np.random.random(100) results, edges = np.histogram(myarray, normed=True) binWidth = edges[1] - edges[0] plt.bar(edges[:-1], results*binWidth, binWidth)
https://stackoverflow.com/questions/3866520/how-can-i-plot-a-histogram-such-that-the-heights-of-the-bars-sum-to-1-in-matplot/31486808#31486808?newreg=36e132288d1c4f22a13dbfa97ec2587a