Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3297e37

Browse files
authored
Merge pull request #6887 from tacaswell/api_stacked_hist_width
API: only shrink hist bars if not stacked
2 parents 9bc745c + e3d0d76 commit 3297e37

18 files changed

Lines changed: 2 additions & 3 deletions

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6206,7 +6206,8 @@ def _normalize_input(inp, ename='input'):
62066206

62076207
if rwidth is not None:
62086208
dr = min(1.0, max(0.0, rwidth))
6209-
elif len(n) > 1:
6209+
elif (len(n) > 1 and
6210+
((not stacked) or rcParams['_internal.classic_mode'])):
62106211
dr = 0.8
62116212
else:
62126213
dr = 1.0
@@ -6377,8 +6378,6 @@ def _normalize_input(inp, ename='input'):
63776378
if lbl is not None:
63786379
p.set_label(lbl)
63796380

6380-
p.set_snap(False)
6381-
63826381
for p in patch[1:]:
63836382
p.update(kwargs)
63846383
p.set_label('_nolegend_')
-63 Bytes
Loading
-51 Bytes
Loading
-142 Bytes
Loading
-19 Bytes
Loading
-106 Bytes
Loading
198 Bytes
Loading
145 Bytes
Loading
222 Bytes
Loading
257 Bytes
Loading

0 commit comments

Comments
 (0)