@@ -6324,7 +6324,7 @@ def clabel(self, CS, *args, **kwargs):
6324
6324
#### Data analysis
6325
6325
6326
6326
@_preprocess_data (replace_names = ["x" , 'weights' ], label_namer = "x" )
6327
- def hist (self , x , bins = None , range = None , density = None , weights = None ,
6327
+ def hist (self , x , bins = None , range = None , density = False , weights = None ,
6328
6328
cumulative = False , bottom = None , histtype = 'bar' , align = 'mid' ,
6329
6329
orientation = 'vertical' , rwidth = None , log = False ,
6330
6330
color = None , label = None , stacked = False , ** kwargs ):
@@ -6396,11 +6396,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6396
6396
number of observations. If *stacked* is also ``True``, the sum of
6397
6397
the histograms is normalized to 1.
6398
6398
6399
- Default is ``None`` for both *normed* and *density*. If either is
6400
- set, then that value will be used. If neither are set, then the
6401
- args will be treated as ``False``.
6402
-
6403
- If both *density* and *normed* are set an error is raised.
6399
+ Default is ``False``.
6404
6400
6405
6401
weights : (n, ) array_like or None, optional
6406
6402
An array of weights, of the same shape as *x*. Each value in *x*
@@ -6420,15 +6416,18 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6420
6416
6421
6417
(or you may alternatively use `~.bar()`).
6422
6418
6423
- cumulative : bool, optional
6419
+ cumulative : bool or -1 , optional
6424
6420
If ``True``, then a histogram is computed where each bin gives the
6425
6421
counts in that bin plus all bins for smaller values. The last bin
6426
- gives the total number of datapoints. If *normed* or *density*
6427
- is also ``True`` then the histogram is normalized such that the
6428
- last bin equals 1. If *cumulative* evaluates to less than 0
6429
- (e.g., -1), the direction of accumulation is reversed.
6430
- In this case, if *normed* and/or *density* is also ``True``, then
6431
- the histogram is normalized such that the first bin equals 1.
6422
+ gives the total number of datapoints.
6423
+
6424
+ If *density* is also ``True`` then the histogram is normalized such
6425
+ that the last bin equals 1.
6426
+
6427
+ If *cumulative* is a number less than 0 (e.g., -1), the direction
6428
+ of accumulation is reversed. In this case, if *density* is also
6429
+ ``True``, then the histogram is normalized such that the first bin
6430
+ equals 1.
6432
6431
6433
6432
Default is ``False``
6434
6433
@@ -6445,26 +6444,19 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6445
6444
6446
6445
- 'bar' is a traditional bar-type histogram. If multiple data
6447
6446
are given the bars are arranged side by side.
6448
-
6449
6447
- 'barstacked' is a bar-type histogram where multiple
6450
6448
data are stacked on top of each other.
6451
-
6452
- - 'step' generates a lineplot that is by default
6453
- unfilled.
6454
-
6455
- - 'stepfilled' generates a lineplot that is by default
6456
- filled.
6449
+ - 'step' generates a lineplot that is by default unfilled.
6450
+ - 'stepfilled' generates a lineplot that is by default filled.
6457
6451
6458
6452
Default is 'bar'
6459
6453
6460
6454
align : {'left', 'mid', 'right'}, optional
6461
6455
Controls how the histogram is plotted.
6462
6456
6463
- - 'left': bars are centered on the left bin edges.
6464
-
6465
- - 'mid': bars are centered between the bin edges.
6466
-
6467
- - 'right': bars are centered on the right bin edges.
6457
+ - 'left': bars are centered on the left bin edges.
6458
+ - 'mid': bars are centered between the bin edges.
6459
+ - 'right': bars are centered on the right bin edges.
6468
6460
6469
6461
Default is 'mid'
6470
6462
0 commit comments