Skip to content
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

MatplotlibDeprecationWarning: The global colormaps dictionary is no longer considered public API #890

Closed
ejeschke opened this issue Aug 29, 2020 · 4 comments · Fixed by #891
Labels
maintenance Work done to keep code maintained

Comments

@ejeschke
Copy link
Owner

This deprecation warning appears from this line in ginga.cmap. It looks like matplotlib is trying to deprecate accessing the global colormaps dictionary.

So far I have not found a replacement API for getting the same information using a public API.

@pllim
Copy link
Collaborator

pllim commented Aug 29, 2020

Hmm. I haven't seen it. Maybe I am not using a new enough Matplotlib.

@pllim pllim added the maintenance Work done to keep code maintained label Aug 29, 2020
@ejeschke
Copy link
Owner Author

Seems to be a bleeding-edge version...

@ejeschke
Copy link
Owner Author

Looks like we might be able to replace

for name in _cm.cmap_d:

with

for name in _cm._gen_cmap_registry():

But of course that also looks like an internal API, and we'd need to check matplotlib version before trying to access it.

@pllim
Copy link
Collaborator

pllim commented Aug 29, 2020

xref matplotlib/matplotlib#16991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Work done to keep code maintained
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants