@@ -6476,22 +6476,20 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
6476
6476
range of x.
6477
6477
6478
6478
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 bin width*
6481
+ (``n = n0 / sum(n0) * np.diff(bins)``), so that the area under
6482
+ the histogram integrates to 1 (``np.sum(n * np.diff(bins)) == 1``).
6485
6483
6486
6484
If *stacked* is also ``True``, the sum of the histograms is
6487
6485
normalized to 1.
6488
6486
6489
6487
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.
6488
+ An array of weights, of the same shape as *x*. Each value in
6489
+ *x* only contributes its associated weight towards the bin count
6490
+ (instead of 1). If *density* is ``True``, the weights are
6491
+ normalized, so that the integral of the density over the range
6492
+ remains 1.
6495
6493
6496
6494
This parameter can be used to draw a histogram of data that has
6497
6495
already been binned, e.g. using `numpy.histogram` (by treating each
@@ -6916,8 +6914,8 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
6916
6914
considered outliers and not tallied in the histogram.
6917
6915
6918
6916
density : bool, default: False
6919
- Normalize histogram. *normed* is a deprecated synonym for this
6920
- parameter.
6917
+ Normalize histogram. See the documentation for the *density*
6918
+ parameter of `~.Axes.hist` for more details .
6921
6919
6922
6920
weights : array-like, shape (n, ), optional
6923
6921
An array of values w_i weighing each sample (x_i, y_i).
@@ -6976,7 +6974,7 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
6976
6974
"""
6977
6975
6978
6976
h , xedges , yedges = np .histogram2d (x , y , bins = bins , range = range ,
6979
- normed = density , weights = weights )
6977
+ density = density , weights = weights )
6980
6978
6981
6979
if cmin is not None :
6982
6980
h [h < cmin ] = None
0 commit comments