-
Notifications
You must be signed in to change notification settings - Fork 29
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
handle validate_legend_loc
deprecation in matplotlib >=3.3
#33
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the PR. According to the matplotlib deprecation information,
It would make more sense to have the following function def _validate_legend_loc(loc):
rc = matplotlib.RcParams()
rc["legend.loc"] = loc |
Add rotate scale bar, update documentation, deprecate height_fraction and label_formatter
Thanks! Updated the function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
validate_legend_loc
is deprecated in matplotlib 3.3 (to be removed in 3.5) and leaves annoying warnings.However, the warnings only show up if you update the rcParams using :
matplotlib.rcParams.update({"scalebar.location": "lower right})
. They don't show up if you do :defaultParams.update({"scalebar.location": "lower right})
and that's likely why it doesn't show up while running tests inmatplotlib_scalebar
. (Found this out because I kept getting annoying warnings like this while building documentation for my package)(not sure if not showing deprecation warning in
defaultParams.update
counts as a bug on matplotlib's end)Anyways, this PR should fix the deprecation warning. My current take is to simply take the
validate_legend_loc
implementation from matplotlib. Maybe there's a better way...but this works