@@ -6351,7 +6351,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6351
6351
orientation = 'vertical' , rwidth = None , log = False ,
6352
6352
color = None , label = None , stacked = False , normed = None ,
6353
6353
** kwargs ):
6354
- """
6354
+ r """
6355
6355
Plot a histogram.
6356
6356
6357
6357
Compute and draw the histogram of *x*. The return value is a tuple
@@ -6550,9 +6550,10 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6550
6550
edge of last bin). Always a single array even when multiple data
6551
6551
sets are passed in.
6552
6552
6553
- patches : list or list of lists
6554
- Silent list of individual patches used to create the histogram
6555
- or list of such list if multiple input datasets.
6553
+ patches : `.BarContainer` or list of single `.Polygon`\s or list of \
6554
+ such objects
6555
+ Container of individual artists used to create the histogram
6556
+ or list of such containers if there are multiple input datasets.
6556
6557
6557
6558
Other Parameters
6558
6559
----------------
@@ -6865,9 +6866,11 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6865
6866
p .set_label ('_nolegend_' )
6866
6867
6867
6868
if nx == 1 :
6868
- return tops [0 ], bins , cbook . silent_list ( 'Patch' , patches [0 ])
6869
+ return tops [0 ], bins , patches [0 ]
6869
6870
else :
6870
- return tops , bins , cbook .silent_list ('Lists of Patches' , patches )
6871
+ patch_type = ("BarContainer" if histtype .startswith ("bar" )
6872
+ else "List[Polygon]" )
6873
+ return tops , bins , cbook .silent_list (patch_type , patches )
6871
6874
6872
6875
@_preprocess_data (replace_names = ["x" , "y" , "weights" ])
6873
6876
@cbook ._rename_parameter ("3.1" , "normed" , "density" )
0 commit comments