@@ -5649,7 +5649,7 @@ def twiny(self):
5649
5649
5650
5650
#### Data analysis
5651
5651
5652
- def hist (self , x , bins = 10 , normed = False , cumulative = False ,
5652
+ def hist (self , x , bins = 10 , range = None , normed = False , cumulative = False ,
5653
5653
bottom = None , histtype = 'bar' , align = 'mid' ,
5654
5654
orientation = 'vertical' , rwidth = None , log = False , ** kwargs ):
5655
5655
"""
@@ -5669,6 +5669,10 @@ def hist(self, x, bins=10, normed=False, cumulative=False,
5669
5669
either an integer number of bins or a sequence giving the
5670
5670
bins. x are the data to be binned. x can be an array or a 2D
5671
5671
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()).
5672
5676
5673
5677
normed:
5674
5678
if True, the first element of the return tuple will
@@ -5742,11 +5746,11 @@ def hist(self, x, bins=10, normed=False, cumulative=False,
5742
5746
for i in xrange (x .shape [1 ]):
5743
5747
# this will automatically overwrite bins,
5744
5748
# 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 ,
5746
5750
normed = bool (normed ), new = True )
5747
5751
n .append (m )
5748
5752
else :
5749
- n , bins = np .histogram (x , bins , range = None ,
5753
+ n , bins = np .histogram (x , bins , range = range ,
5750
5754
normed = bool (normed ), new = True )
5751
5755
n = [n ,]
5752
5756
0 commit comments