Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions doc/api/next_api_changes/deprecations/31630-ES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
``apply_theta_transforms`` option in ``PolarTransform``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Applying theta transforms in `~matplotlib.projections.polar.PolarTransform` and
`~matplotlib.projections.polar.InvertedPolarTransform` has been removed, and the
*apply_theta_transforms* keyword argument is deprecated for both classes.

If you need to retain the behaviour where theta values are transformed, chain the
``PolarTransform`` with a `~matplotlib.transforms.Affine2D` transform that performs the
theta shift and/or sign shift.
10 changes: 0 additions & 10 deletions doc/api/next_api_changes/removals/30004-DS.rst

This file was deleted.

8 changes: 6 additions & 2 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class PolarTransform(mtransforms.Transform):

input_dims = output_dims = 2

def __init__(self, axis=None, use_rmin=True, *, scale_transform=None):
@_api.delete_parameter('3.11', 'apply_theta_transforms')
def __init__(self, axis=None, use_rmin=True, *,
apply_theta_transforms=False, scale_transform=None):
"""
Parameters
----------
Expand Down Expand Up @@ -183,7 +185,9 @@ class InvertedPolarTransform(mtransforms.Transform):
"""
input_dims = output_dims = 2

def __init__(self, axis=None, use_rmin=True):
@_api.delete_parameter('3.11', 'apply_theta_transforms')
def __init__(self, axis=None, use_rmin=True,
*, apply_theta_transforms=False):
"""
Parameters
----------
Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/projections/polar.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class PolarTransform(mtransforms.Transform):
axis: PolarAxes | None = ...,
use_rmin: bool = ...,
*,
apply_theta_transforms: bool = ...,
scale_transform: mtransforms.Transform | None = ...,
) -> None: ...
def inverted(self) -> InvertedPolarTransform: ...
Expand All @@ -34,6 +35,8 @@ class InvertedPolarTransform(mtransforms.Transform):
self,
axis: PolarAxes | None = ...,
use_rmin: bool = ...,
*,
apply_theta_transforms: bool = ...,
) -> None: ...
def inverted(self) -> PolarTransform: ...

Expand Down
Loading