-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Deprecate 'prune' kwarg to MaxNLocator #25191
Conversation
8e188b7
to
d58a817
Compare
"3.8", message="The 'prune' keyword argument is deprecated, " | ||
"and will be removed in Matplotlib %(removal)s. Tick pruning " | ||
"should be done manually after the ticks have been generated." |
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.
The last sentence should be passed to addendum
instead of overriding message
.
def __init__(self, nbins=10, steps=None, | ||
trim=True, | ||
integer=False, | ||
symmetric=False, | ||
prune=None): | ||
# trim argument has no effect. It has been left for API compatibility |
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.
We should keep this comment, or also look into deprecating it as well.
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.
Make steps keyword only?
@@ -0,0 +1,6 @@ | |||
Automatically pruning ticks in ``MaxNLocator`` | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
The ``prune`` keyword argument to both `matplotlib.ticker.MaxNLocator` and |
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.
The ``prune`` keyword argument to both `matplotlib.ticker.MaxNLocator` and | |
The *prune* keyword argument to both `matplotlib.ticker.MaxNLocator` and |
@@ -2044,8 +2038,6 @@ def set_params(self, **kwargs): | |||
see `.MaxNLocator` | |||
symmetric : bool, optional | |||
see `.MaxNLocator` | |||
prune : {'lower', 'upper', 'both', None}, optional |
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.
Not remove yet? Add deprecation notice instead?
It's been too long since I looked at this, and the rebase isn't simple, so I'm going to close. If someone really thinks we should get this in please shout, otherwise I won't pursue it. |
PR Summary
We do not seem to use
prune
in any tests or examples, so it seems resonable to deprecate because:MaxNLocator
prune
is not particularly new, dating back 14 years: 0c79ba3PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst