Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,14 @@ def transform_non_affine(self, values):

def inverted(self):
# docstring inherited
return PolarAxes.PolarTransform(
self._axis, self._use_rmin,
apply_theta_transforms=self._apply_theta_transforms
# Cache local variables to avoid repeated attribute/dict lookups in tight loops
axis = self._axis
use_rmin = self._use_rmin
apply_theta_transforms = self._apply_theta_transforms
PolarTransform = PolarAxes.PolarTransform # localize attribute lookup
return PolarTransform(
axis, use_rmin,
apply_theta_transforms=apply_theta_transforms
)


Expand Down