8000 De-duplicated code in bar · matplotlib/matplotlib@70afe12 · GitHub
[go: up one dir, main page]

Skip to content

Commit 70afe12

Browse files
committed
De-duplicated code in bar
1 parent 9e7296c commit 70afe12

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,10 +2025,6 @@ def make_iterable(x):
20252025
bottom = [0]
20262026

20272027
nbars = len(left)
2028-
if len(height) == 1:
2029-
height *= nbars
2030-
if len(width) == 1:
2031-
width *= nbars
20322028
if len(bottom) == 1:
20332029
bottom *= nbars
20342030

@@ -2047,16 +2043,16 @@ def make_iterable(x):
20472043
nbars = len(bottom)
20482044
if len(left) == 1:
20492045
left *= nbars
2050-
if len(height) == 1:
2051-
height *= nbars
2052-
if len(width) == 1:
2053-
width *= nbars
20542046

20552047
tick_label_axis = self.yaxis
20562048
tick_label_position = bottom
20572049
else:
20582050
raise ValueError('invalid orientation: %s' % orientation)
20592051

2052+
if len(height) == 1:
2053+
height *= nbars
2054+
if len(width) == 1:
2055+
width *= nbars
20602056
if len(linewidth) < nbars:
20612057
linewidth *= nbars
20622058

0 commit comments

Comments
 (0)
0