From 13a3da74bb25ca9c88834be02c29684856ec736d Mon Sep 17 00:00:00 2001 From: patniharshit Date: Fri, 19 May 2017 15:48:57 +0530 Subject: [PATCH 1/3] Remove unused resolution kwarg to PolarAxes --- lib/matplotlib/projections/__init__.py | 5 ----- lib/matplotlib/projections/polar.py | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/lib/matplotlib/projections/__init__.py b/lib/matplotlib/projections/__init__.py index fc47c95da9c8..1e423420b0b6 100644 --- a/lib/matplotlib/projections/__init__.py +++ b/lib/matplotlib/projections/__init__.py @@ -87,11 +87,6 @@ def process_projection_requirements(figure, *args, **kwargs): projection) projection = 'polar' - # ensure that the resolution keyword is always put into the key - # for polar plots - if projection == 'polar': - kwargs.setdefault('resolution', 1) - if isinstance(projection, six.string_types) or projection is None: projection_class = get_projection_class(projection) elif hasattr(projection, '_as_mpl_axes'): diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py index a5d2b03c34b5..e398969df785 100644 --- a/lib/matplotlib/projections/polar.py +++ b/lib/matplotlib/projections/polar.py @@ -227,23 +227,11 @@ class PolarAxes(Axes): def __init__(self, *args, **kwargs): """ Create a new Polar Axes for a polar plot. - - The following optional kwargs are supported: - - - *resolution*: The number of points of interpolation between - each pair of data points. Set to 1 to disable - interpolation. """ - self.resolution = kwargs.pop('resolution', 1) self._default_theta_offset = kwargs.pop('theta_offset', 0) self._default_theta_direction = kwargs.pop('theta_direction', 1) self._default_rlabel_position = kwargs.pop('rlabel_position', 22.5) - if self.resolution not in (None, 1): - warnings.warn( - """The resolution kwarg to Polar plots is now ignored. -If you need to interpolate data points, consider running -cbook.simple_linear_interpolation on the data before passing to matplotlib.""") Axes.__init__(self, *args, **kwargs) self.set_aspect('equal', adjustable='box', anchor='C') self.cla() From 4a294c76e1b8ebae4bb3d74d9412a24e5495e1d7 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Sat, 20 May 2017 00:07:03 +0530 Subject: [PATCH 2/3] Api change entry for resolution kwarg of PolarAxes --- doc/api/api_changes/2017-05-19-resolution_polar_axes.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/api/api_changes/2017-05-19-resolution_polar_axes.rst diff --git a/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst b/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst new file mode 100644 index 000000000000..31497d5137a8 --- /dev/null +++ b/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst @@ -0,0 +1,6 @@ +Removed resolution kwarg from PolarAxes +``````````````````````````````````````` + +The kwarg `resolution` of `matplotlib.projections.polar.PolarAxes` has been +removed. It has triggered a warning of being with no effect which acted as the +deprecation warning as well. From b7473eb144f1779445f324bdde1aaebce6fa7123 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Sun, 21 May 2017 15:17:06 +0530 Subject: [PATCH 3/3] Add version after which resolution kwargs was deprecated --- doc/api/api_changes/2017-05-19-resolution_polar_axes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst b/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst index 31497d5137a8..d049b2a7b34a 100644 --- a/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst +++ b/doc/api/api_changes/2017-05-19-resolution_polar_axes.rst @@ -2,5 +2,5 @@ Removed resolution kwarg from PolarAxes ``````````````````````````````````````` The kwarg `resolution` of `matplotlib.projections.polar.PolarAxes` has been -removed. It has triggered a warning of being with no effect which acted as the -deprecation warning as well. +removed. It has triggered a deprecation warning of being with no effect +beyond version `0.98.x`.