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