From 2273b6bc1d36554955dfb54b58201b043533dd90 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sat, 21 Jan 2023 08:18:41 +0100 Subject: [PATCH] Backport PR #25047: Remove dead code from deprecated-and-removed block --- lib/matplotlib/widgets.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 1dc1dd5f77ae..f3f99b3753af 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -3344,12 +3344,6 @@ def _rect_bbox(self): def _set_aspect_ratio_correction(self): aspect_ratio = self.ax._get_aspect_ratio() - if not hasattr(self._selection_artist, '_aspect_ratio_correction'): - # Aspect ratio correction is not supported with deprecated - # drawtype='line'. Remove this block in matplotlib 3.7 - self._aspect_ratio_correction = 1 - return - self._selection_artist._aspect_ratio_correction = aspect_ratio if self._use_data_coordinates: self._aspect_ratio_correction = 1