X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/statistics/histogram_demo_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``

Expand Down
X Tutup