From f7e50dec272112dd702ab1358e2d6f3845518a3b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 16 Nov 2017 01:27:14 -0500 Subject: [PATCH 1/2] Add deprecation for Axes.set_thetagrids(frac). --- lib/matplotlib/projections/polar.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py index 6c519a01a1a6..16d54f9d68a5 100644 --- a/lib/matplotlib/projections/polar.py +++ b/lib/matplotlib/projections/polar.py @@ -1173,6 +1173,11 @@ def set_thetagrids(self, angles, labels=None, frac=None, fmt=None, ACCEPTS: sequence of floats """ + if frac is not None: + cbook.warn_deprecated('2.1', name='frac', obj_type='parameter', + alternative='tick padding via ' + 'Axes.tick_params') + # Make sure we take into account unitized data angles = self.convert_yunits(angles) angles = np.asarray(angles, float) From a3dd1380343a5a992ef852fbb34c12607cbbc086 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 20 Nov 2017 01:31:58 -0500 Subject: [PATCH 2/2] Note deprecation in Polar what's new entry. --- doc/users/whats_new.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index d6e3ba2dabf0..140abed4da20 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -111,13 +111,16 @@ negative values are simply used as labels, and the real radius is shifted by the configured minimum. This release also allows negative radii to be used for grids and ticks, which were previously silently ignored. -Radial ticks have been modified to be parallel to the circular grid -line, and angular ticks have been modified to be parallel to the grid -line. It may also be useful to rotate tick *labels* to match the -boundary. Calling ``ax.tick_params(rotation='auto')`` will enable the -new behavior: radial tick labels will be parallel to the circular grid -line, and angular tick labels will be perpendicular to the grid line -(i.e., parallel to the outer boundary). +Radial ticks have been modified to be parallel to the circular grid line, and +angular ticks have been modified to be parallel to the grid line. It may also +be useful to rotate tick *labels* to match the boundary. Calling +``ax.tick_params(rotation='auto')`` will enable the new behavior: radial tick +labels will be parallel to the circular grid line, and angular tick labels will +be perpendicular to the grid line (i.e., parallel to the outer boundary). +Additionally, tick labels now obey the padding settings that previously only +worked on Cartesian plots. Consequently, the ``frac`` argument to +`.PolarAxes.set_thetagrids` is no longer applied. Tick padding can be modified +with the ``pad`` argument to `.Axes.tick_params` or `.Axis.set_tick_params`. ``Figure`` class now has ``subplots`` method