From 2b50bf83708c6bd635c7992f6c4045316a0ad03b Mon Sep 17 00:00:00 2001 From: HOLZSCHUCH Nicolas Date: Sun, 26 Jun 2022 14:57:00 +0200 Subject: [PATCH] Replace _autoscaleX_on with get_autoscalex_on() --- lib/cartopy/mpl/geoaxes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/cartopy/mpl/geoaxes.py b/lib/cartopy/mpl/geoaxes.py index 85169bce5..15a0422d0 100644 --- a/lib/cartopy/mpl/geoaxes.py +++ b/lib/cartopy/mpl/geoaxes.py @@ -462,15 +462,16 @@ def hold_limits(self, hold=True): data_lim = self.dataLim.frozen().get_points() view_lim = self.viewLim.frozen().get_points() other = (self.ignore_existing_data_limits, - self._autoscaleXon, self._autoscaleYon) + self.get_autoscalex_on(), self.get_autoscaley_on()) try: yield finally: if hold: self.dataLim.set_points(data_lim) self.viewLim.set_points(view_lim) - (self.ignore_existing_data_limits, - self._autoscaleXon, self._autoscaleYon) = other + self.ignore_existing_data_limits = other[0] + self.set_autoscalex_on(other[1]) + self.set_autoscaley_on(other[2]) def _draw_preprocess(self, renderer): """ @@ -881,11 +882,11 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True): """ super().autoscale_view(tight=tight, scalex=scalex, scaley=scaley) # Limit the resulting bounds to valid area. - if scalex and self._autoscaleXon: + if scalex and self.get_autoscalex_on(): bounds = self.get_xbound() self.set_xbound(max(bounds[0], self.projection.x_limits[0]), min(bounds[1], self.projection.x_limits[1])) - if scaley and self._autoscaleYon: + if scaley and self.get_autoscaley_on(): bounds = self.get_ybound() self.set_ybound(max(bounds[0], self.projection.y_limits[0]), min(bounds[1], self.projection.y_limits[1]))