-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add deprecation for Axes.set_thetagrids(frac). #9796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be 2.2
(or maybe 2.1.1
), since 2.1
has already been released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put 2.1
because it technically stopped working in that version. Not sure how much effort is worth it to re-enable the functionality.
Can you also add a note to the whats_new or api_changes that went along with the polar update? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange to raise a deprecation warning for something that's just outright no longer there, but I don't see a better way.
Are there any examples of how to implement this functionality by setting the padding on the ticks? All my polar plots used frac to put the theta labels inside the plot. |
Never mind, got it. ax.tick_params( 'x', pad = -15 ) works for the theta axis. I can't follow it with a similar call for the y axis though such as ax.tick_params( 'y', pad = -15 ) |
PR Summary
Using
frac
is no longer possible, but replaced by setting the padding on the ticks. Unfortunately, it is not straightforward to simply restore the behaviour of this parameter within the bounds of the current implementation, since padding is now radius-independent. I think it could be done with a bit of work, but I'm not sure it'd be worth it.Closes #9744.
PR Checklist