@@ -5649,7 +5649,7 @@ def twiny(self):
56495649
56505650 #### Data analysis
56515651
5652- def hist (self , x , bins = 10 , normed = False , cumulative = False ,
5652+ def hist (self , x , bins = 10 , range = None , normed = False , cumulative = False ,
56535653 bottom = None , histtype = 'bar' , align = 'mid' ,
56545654 orientation = 'vertical' , rwidth = None , log = False , ** kwargs ):
56555655 """
@@ -5669,6 +5669,10 @@ def hist(self, x, bins=10, normed=False, cumulative=False,
56695669 either an integer number of bins or a sequence giving the
56705670 bins. x are the data to be binned. x can be an array or a 2D
56715671 array with multiple data in its columns.
5672+
5673+ range:
5674+ The lower and upper range of the bins. Lower and upper outliers
5675+ are ignored. If not provided, range is (x.min(), x.max()).
56725676
56735677 normed:
56745678 if True, the first element of the return tuple will
@@ -5742,11 +5746,11 @@ def hist(self, x, bins=10, normed=False, cumulative=False,
57425746 for i in xrange (x .shape [1 ]):
57435747 # this will automatically overwrite bins,
57445748 # so that each histogram uses the same bins
5745- m , bins = np .histogram (x [:,i ], bins , range = None ,
5749+ m , bins = np .histogram (x [:,i ], bins , range = range ,
57465750 normed = bool (normed ), new = True )
57475751 n .append (m )
57485752 else :
5749- n , bins = np .histogram (x , bins , range = None ,
5753+ n , bins = np .histogram (x , bins , range = range ,
57505754 normed = bool (normed ), new = True )
57515755 n = [n ,]
57525756
0 commit comments