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

Skip to content

Commit 14b8047

Browse files
committed
MNT: Raise on GeoAxes limits manipulation
GeoAxes does not support changing limits. We already raised on `set_x/ylim()`. This now also raises on `set_x/ybounds()` and `invert_x/yaxis()`. Closes #28590.
1 parent a04e35f commit 14b8047

File tree

1 file changed

+9
-0
lines changed
  • lib/matplotlib/projections

1 file changed

+9
-0
lines changed

lib/matplotlib/projections/geo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ def set_xlim(self, *args, **kwargs):
151151
"not supported. Please consider using Cartopy.")
152152

153153
set_ylim = set_xlim
154+
set_xbound = set_xlim
155+
set_ybound = set_ylim
156+
157+
def invert_xaxis(self):
158+
"""Not supported. Please consider using Cartopy."""
159+
raise TypeError("Changing axes limits of a geographic projection is "
160+
"not supported. Please consider using Cartopy.")
161+
162+
invert_yaxis = invert_xaxis
154163

155164
def format_coord(self, lon, lat):
156165
"""Return a format string formatting the coordinate."""

0 commit comments

Comments
 (0)