Deprecation of the top-level cmap registration and access functions in mpl.cm
in plot_utils.py
from matplotlib 3.9.0
#555
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.
Hi everyone,
It has been a while since Matplotlib has been informing us about the deprecation of the top-level camp registration and access functions in
mpl.cm
, but now, in version Matplotlib 3.9.0, I noticed that the functions have definitely changed and it is no longer a simple deprecation warning. More details here: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#top-level-cmap-registration-and-access-functions-in-mpl-cmSince
ptypy
uses them often inplot_utils.py
, I don't know what you plan to do.I made the changes that worked for me, but I will let you check them. If I understood it correctly, those changes should be compatible with Matplotlib>3.6.0 from 2022, so if we implement them,
ptypy
should not be used with older versions of Matplotlib.Please let me know what you decide. You can decline this PR if you want.