@@ -6273,28 +6273,23 @@ def _normalize_input(inp, ename='input'):
6273
6273
totwidth = np .diff (bins )
6274
6274
6275
6275
if rwidth is not None :
6276
- dr = min ( 1.0 , max ( 0.0 , rwidth ) )
6276
+ dr = np . clip ( rwidth , 0 , 1 )
6277
6277
elif (len (n ) > 1 and
6278
6278
((not stacked ) or rcParams ['_internal.classic_mode' ])):
6279
6279
dr = 0.8
6280
6280
else :
6281
6281
dr = 1.0
6282
6282
6283
6283
if histtype == 'bar' and not stacked :
6284
- width = dr * totwidth / nx
6284
+ width = dr * totwidth / nx
6285
6285
dw = width
6286
-
6287
- if nx > 1 :
6288
- boffset = - 0.5 * dr * totwidth * (1.0 - 1.0 / nx )
6289
- else :
6290
- boffset = 0.0
6291
- stacked = False
6286
+ boffset = - 0.5 * dr * totwidth * (1 - 1 / nx )
6292
6287
elif histtype == 'barstacked' or stacked :
6293
- width = dr * totwidth
6288
+ width = dr * totwidth
6294
6289
boffset , dw = 0.0 , 0.0
6295
6290
6296
6291
if align == 'mid' or align == 'edge' :
6297
- boffset += 0.5 * totwidth
6292
+ boffset += 0.5 * totwidth
6298
6293
elif align == 'right' :
6299
6294
boffset += totwidth
6300
6295
@@ -6307,7 +6302,7 @@ def _normalize_input(inp, ename='input'):
6307
6302
6308
6303
for m , c in zip (n , color ):
6309
6304
if bottom is None :
6310
- bottom = np .zeros (len (m ), float )
6305
+ bottom = np .zeros (len (m ))
6311
6306
if stacked :
6312
6307
height = m - bottom
6313
6308
else :
@@ -6326,14 +6321,14 @@ def _normalize_input(inp, ename='input'):
6326
6321
6327
6322
elif histtype .startswith ('step' ):
6328
6323
# these define the perimeter of the polygon
6329
- x = np .zeros (4 * len (bins ) - 3 , float )
6330
- y = np .zeros (4 * len (bins ) - 3 , float )
6324
+ x = np .zeros (4 * len (bins ) - 3 )
6325
+ y = np .zeros (4 * len (bins ) - 3 )
6331
6326
6332
6327
x [0 :2 * len (bins )- 1 :2 ], x [1 :2 * len (bins )- 1 :2 ] = bins , bins [:- 1 ]
6333
6328
x [2 * len (bins )- 1 :] = x [1 :2 * len (bins )- 1 ][::- 1 ]
6334
6329
6335
6330
if bottom is None :
6336
- bottom = np .zeros (len (bins )- 1 , float )
6331
+ bottom = np .zeros (len (bins ) - 1 )
6337
6332
6338
6333
y [1 :2 * len (bins )- 1 :2 ], y [2 :2 * len (bins ):2 ] = bottom , bottom
6339
6334
y [2 * len (bins )- 1 :] = y [1 :2 * len (bins )- 1 ][::- 1 ]
0 commit comments