@@ -5682,7 +5682,7 @@ def table(self, **kwargs):
5682
5682
5683
5683
@unpack_labeled_data (replace_names = ["x" , 'weights' ], label_namer = "x" )
5684
5684
@docstring .dedent_interpd
5685
- def hist (self , x , bins = 10 , range = None , normed = False , weights = None ,
5685
+ def hist (self , x , bins = None , range = None , normed = False , weights = None ,
5686
5686
cumulative = False , bottom = None , histtype = 'bar' , align = 'mid' ,
5687
5687
orientation = 'vertical' , rwidth = None , log = False ,
5688
5688
color = None , label = None , stacked = False ,
@@ -5708,14 +5708,16 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
5708
5708
Input values, this takes either a single array or a sequency of
5709
5709
arrays which are not required to be of the same length
5710
5710
5711
- bins : integer or array_like, optional
5711
+ bins : integer or array_like or 'auto' , optional
5712
5712
If an integer is given, `bins + 1` bin edges are returned,
5713
5713
consistently with :func:`numpy.histogram` for numpy version >=
5714
5714
1.3.
5715
5715
5716
5716
Unequally spaced bins are supported if `bins` is a sequence.
5717
5717
5718
- default is 10
5718
+ If Numpy 1.11 is installed, may also be ``'auto'``.
5719
+
5720
+ Default is taken from the rcParam ``hist.bins``.
5719
5721
5720
5722
range : tuple or None, optional
5721
5723
The lower and upper range of the bins. Lower and upper outliers
@@ -5877,6 +5879,9 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
5877
5879
if np .isscalar (x ):
5878
5880
x = [x ]
5879
5881
5882
+ if bins is None :
5883
+ bins = rcParams ['hist.bins' ]
5884
+
5880
5885
# xrange becomes range after 2to3
5881
5886
bin_range = range
5882
5887
range = __builtins__ ["range" ]
0 commit comments