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

Fix colormap registration #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

xgarrido
Copy link
Contributor

@xgarrido xgarrido commented Sep 21, 2024

matplotlib.cm.register_cmap has been removed and matplotlib.colormaps.register has been around since almost 3 years (since version 3.5.0 of matplotlib). Not sure it is worth adding a backward compatible flag such as

import matplotlib
if matplotlib.__version__ >= "3.5.0":
  matplotlib.colormaps.register(cmap, name=name)
else:
  matplotlib.cm.register_cmap(name, cmap)

`matplotlib.cm.register_cmap` has been removed and `matplotlib.colormaps.register` has been around since almost 3 years
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant