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

Skip to content

Commit b17826c

Browse files
committed
FIX: allow bottom-only call
1 parent 665cf51 commit b17826c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/projections/polar.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,9 +1202,13 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
12021202
'argument and kwarg "ymax"')
12031203
else:
12041204
top = ymax
1205-
if top is None and len(bottom) == 2:
1206-
top = bottom[1]
1207-
bottom = bottom[0]
1205+
if top is None:
1206+
try:
1207+
top = bottom[1]
1208+
bottom = bottom[0]
1209+
except TypeError:
1210+
# no top
1211+
super().set_ylim(bottom=bottom, emit=emit, auto=auto)
12081212

12091213
return super().set_ylim(bottom=bottom, top=top, emit=emit, auto=auto)
12101214

0 commit comments

Comments
 (0)