diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py index 6bd72d2e35e0..18693e193099 100644 --- a/lib/matplotlib/projections/polar.py +++ b/lib/matplotlib/projections/polar.py @@ -830,8 +830,10 @@ def __init__(self, *args, self._default_theta_offset = theta_offset self._default_theta_direction = theta_direction self._default_rlabel_position = np.deg2rad(rlabel_position) - super().__init__(*args, **kwargs) + # Set use_sticky_edges before super().__init__ to avoid unnecessary property assignment after initialization. self.use_sticky_edges = True + # Call super().__init__ before calling set_aspect and clear for proper base initialization. + super().__init__(*args, **kwargs) self.set_aspect('equal', adjustable='box', anchor='C') self.clear()