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
This StackOverflow question sums up the problem pretty well. The answer is straightforward but convoluted. This kind of functionality is widely used and requested, so it would be of great benefit for the hist function to handle it automatically.
Basically, setting the normed kwarg to a logically true value normalizes the histogram such that the integral is equal to 1. I suggest creating a new kwarg, named something like normedheight (or perhaps normedh), which implements the solution proposed in the StackOverflow post.