diff --git a/examples/statistics/histogram_demo_features.py b/examples/statistics/histogram_demo_features.py index 32c56cb81d4..681cb0f7e15 100644 --- a/examples/statistics/histogram_demo_features.py +++ b/examples/statistics/histogram_demo_features.py @@ -27,7 +27,7 @@ y = mlab.normpdf(bins, mu, sigma) plt.plot(bins, y, '--') plt.xlabel('Smarts') -plt.ylabel('Probability') +plt.ylabel('Probability density') plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$') # Tweak spacing to prevent clipping of ylabel diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 4f620ba3199..080f88a404c 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5801,9 +5801,11 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, normed : boolean, optional If `True`, the first element of the return tuple will be the counts normalized to form a probability density, i.e., - ``n/(len(x)`dbin)``, i.e., the integral of the histogram will sum - to 1. If *stacked* is also *True*, the sum of the histograms is - normalized to 1. + the area (or integral) under the histogram will sum to 1. + This is achieved dividing the count by the number of observations + times the bin width and *not* dividing by the total number + of observations. If `stacked` is also `True`, the sum of the + histograms is normalized to 1. Default is ``False``