Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b0c82a

Browse filesBrowse files
authored
Merge pull request #9796 from QuLogic/polar-frac
Add deprecation for Axes.set_thetagrids(frac).
2 parents a54f466 + a3dd138 commit 7b0c82a
Copy full SHA for 7b0c82a

File tree

Expand file treeCollapse file tree

2 files changed

+15
-7
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-7
lines changed

‎doc/users/whats_new.rst

Copy file name to clipboardExpand all lines: doc/users/whats_new.rst
+10-7Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,16 @@ negative values are simply used as labels, and the real radius is shifted by
111111
the configured minimum. This release also allows negative radii to be used for
112112
grids and ticks, which were previously silently ignored.
113113

114-
Radial ticks have been modified to be parallel to the circular grid
115-
line, and angular ticks have been modified to be parallel to the grid
116-
line. It may also be useful to rotate tick *labels* to match the
117-
boundary. Calling ``ax.tick_params(rotation='auto')`` will enable the
118-
new behavior: radial tick labels will be parallel to the circular grid
119-
line, and angular tick labels will be perpendicular to the grid line
120-
(i.e., parallel to the outer boundary).
114+
Radial ticks have been modified to be parallel to the circular grid line, and
115+
angular ticks have been modified to be parallel to the grid line. It may also
116+
be useful to rotate tick *labels* to match the boundary. Calling
117+
``ax.tick_params(rotation='auto')`` will enable the new behavior: radial tick
118+
labels will be parallel to the circular grid line, and angular tick labels will
119+
be perpendicular to the grid line (i.e., parallel to the outer boundary).
120+
Additionally, tick labels now obey the padding settings that previously only
121+
worked on Cartesian plots. Consequently, the ``frac`` argument to
122+
`.PolarAxes.set_thetagrids` is no longer applied. Tick padding can be modified
123+
with the ``pad`` argument to `.Axes.tick_params` or `.Axis.set_tick_params`.
121124

122125

123126
``Figure`` class now has ``subplots`` method

‎lib/matplotlib/projections/polar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/projections/polar.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,11 @@ def set_thetagrids(self, angles, labels=None, frac=None, fmt=None,
11731173
11741174
ACCEPTS: sequence of floats
11751175
"""
1176+
if frac is not None:
1177+
cbook.warn_deprecated('2.1', name='frac', obj_type='parameter',
1178+
alternative='tick padding via '
1179+
'Axes.tick_params')
1180+
11761181
# Make sure we take into account unitized data
11771182
angles = self.convert_yunits(angles)
11781183
angles = np.asarray(angles, float)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.