8000 FIX: make y/rlims out of order raise a Value Error · matplotlib/matplotlib@32e9b42 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32e9b42

Browse files
committed
FIX: make y/rlims out of order raise a Value Error
1 parent 0f116b7 commit 32e9b42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/projections/polar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,8 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
12401240
12411241
Notes
12421242
-----
1243-
The `bottom` value must be less than the `top` value; if they are not,
1244-
a warning is emmited and the values are swapped.
1243+
The `bottom` value must be less than the `top` value, or a
1244+
ValueError is raised.
12451245
"""
12461246

12471247
if ymin is not None:
@@ -1257,9 +1257,9 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
12571257
else:
12581258
top = ymax
12591259
if bottom >= top:
1260-
warnings.warn('polar axes y/r limits must be increasing;'
1261-
'swapping order')
1262-
bottom, top = top, bottom
1260+
raise ValueError('polar axes y/r-limits must be increasing; '
1261+
'i.e. bottom < top')
1262+
12631263
return super().set_ylim(bottom=bottom, top=top, emit=emit, auto=auto)
12641264

12651265
def get_rlabel_position(self):

0 commit comments

Comments
 (0)
0