I generated the figure below using the a call to matplotlib.pyplot.hist in which I passed the kwarg normed=True:

Upon further research, I realized that this kind of normalization works in such a way that the integral of the histogram is equal to 1. How can I plot this same data such that the sum of the heights of the bars equals 1?
In other words, I want each bit to represent the proportion of the whole that its values contain.
I’m not sure if there’s a straightforward way, but
you can manually divide all bar heights by the length of the input (the following is made in
ipython --pylabto skip the imports):Which gives you
Now, you can do:
and get