@@ -6147,13 +6147,6 @@ def _normalize_input(inp, ename='input'):
6147
6147
if bins is None :
6148
6148
bins = rcParams ['hist.bins' ]
6149
6149
6150
- # xrange becomes range after 2to3
6151
- bin_range = range
6152
- range = __builtins__ ["range" ]
6153
-
6154
- # NOTE: the range keyword overwrites the built-in func range !!!
6155
- # needs to be fixed in numpy !!!
6156
-
6157
6150
# Validate string inputs here so we don't have to clutter
6158
6151
# subsequent code.
6159
6152
if histtype not in ['bar' , 'barstacked' , 'step' , 'stepfilled' ]:
@@ -6172,11 +6165,11 @@ def _normalize_input(inp, ename='input'):
6172
6165
# process the unit information
6173
6166
self ._process_unit_info (xdata = x , kwargs = kwargs )
6174
6167
x = self .convert_xunits (x )
6175
- if bin_range is not None :
6176
- bin_range = self .convert_xunits (bin_range )
6168
+ if range is not None :
6169
+ range = self .convert_xunits (range )
6177
6170
6178
6171
# Check whether bins or range are given explicitly.
6179
- binsgiven = (cbook .iterable (bins ) or bin_range is not None )
6172
+ binsgiven = (cbook .iterable (bins ) or range is not None )
6180
6173
6181
6174
# basic input validation
6182
6175
flat = np .ravel (x )
@@ -6205,7 +6198,8 @@ def _normalize_input(inp, ename='input'):
6205
6198
'weights should have the same shape as x' )
6206
6199
6207
6200
if color is None :
6208
- color = [self ._get_lines .get_next_color () for i in xrange (nx )]
6201
+ color = [
6202
+ self ._get_lines .get_next_color () for i in xrange (nx )]
6209
6203
else :
6210
6204
color = mcolors .to_rgba_array (color )
6211
6205
if len (color ) != nx :
@@ -6224,12 +6218,12 @@ def _normalize_input(inp, ename='input'):
6224
6218
if len (xi ) > 0 :
6225
6219
xmin = min (xmin , xi .min ())
6226
6220
xmax = max (xmax , xi .max ())
6227
- bin_range = (xmin , xmax )
6221
+ range = (xmin , xmax )
6228
6222
6229
6223
# hist_kwargs = dict(range=range, normed=bool(normed))
6230
6224
# We will handle the normed kwarg within mpl until we
6231
6225
# get to the point of requiring numpy >= 1.5.
6232
- hist_kwargs = dict (range = bin_range )
6226
+ hist_kwargs = dict (range = range )
6233
6227
6234
6228
n = []
6235
6229
mlast = None
@@ -6514,10 +6508,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
6514
6508
.. plot:: mpl_examples/statistics/plot_hist.py
6515
6509
"""
6516
6510
6517
- # xrange becomes range after 2to3
6518
- bin_range = range
6519
- range = __builtins__ ["range" ]
6520
- h , xedges , yedges = np .histogram2d (x , y , bins = bins , range = bin_range ,
6511
+ h , xedges , yedges = np .histogram2d (x , y , bins = bins , range = range ,
6521
6512
normed = normed , weights = weights )
6522
6513
6523
6514
if cmin is not None :
0 commit comments