@@ -6476,22 +6476,22 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
64766476 range of x.
64776477
64786478 density : bool, default: False
6479- If ``True``, the first element of the return tuple will
6480- be the raw counts per bin normalized to form a probability density
6481- so that the area under the histogram will integrate to 1, i.e.
6482- ``np. sum(n * np.diff(bins)) == 1``. (Computed by dividing the
6483- raw counts ``n0`` by the total number of data points and
6484- multiplying by the bin width: ``n = n0 / sum(n0) * np.diff(bins)``)
6479+ If ``True``, draw and return a probability density: each bin
6480+ will display the bin's raw count divided by the total number of
6481+ counts *and the bin width*
6482+ (``density = counts / ( sum(counts) * np.diff(bins))``),
6483+ so that the area under the histogram integrates to 1
6484+ (``np. sum(density * np.diff(bins)) == 1 ``).
64856485
64866486 If *stacked* is also ``True``, the sum of the histograms is
64876487 normalized to 1.
64886488
64896489 weights : (n,) array-like or None, default: None
6490- An array of weights, of the same shape as *x*. Each value in *x*
6491- only contributes its associated weight towards the bin count
6492- (instead of 1). If *normed* or * density* is ``True``,
6493- the weights are normalized, so that the integral of the density
6494- over the range remains 1.
6490+ An array of weights, of the same shape as *x*. Each value in
6491+ *x* only contributes its associated weight towards the bin count
6492+ (instead of 1). If *density* is ``True``, the weights are
6493+ normalized, so that the integral of the density over the range
6494+ remains 1.
64956495
64966496 This parameter can be used to draw a histogram of data that has
64976497 already been binned, e.g. using `numpy.histogram` (by treating each
@@ -6916,8 +6916,8 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
69166916 considered outliers and not tallied in the histogram.
69176917
69186918 density : bool, default: False
6919- Normalize histogram. *normed* is a deprecated synonym for this
6920- parameter.
6919+ Normalize histogram. See the documentation for the *density*
6920+ parameter of `~.Axes.hist` for more details .
69216921
69226922 weights : array-like, shape (n, ), optional
69236923 An array of values w_i weighing each sample (x_i, y_i).
@@ -6976,7 +6976,7 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
69766976 """
69776977
69786978 h , xedges , yedges = np .histogram2d (x , y , bins = bins , range = range ,
6979- normed = density , weights = weights )
6979+ density = density , weights = weights )
69806980
69816981 if cmin is not None :
69826982 h [h < cmin ] = None
0 commit comments