-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added documentation on getting full list of registered colormaps re: issue #26244 #26930
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
Conversation
lib/matplotlib/colors.py
Outdated
To get a list of all registered colormaps, you can do:: | ||
|
||
from matplotlib import colormaps | ||
list(colormaps) |
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.
I'm not sure this is the right place; it appears to be in the colour sequences section.
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.
agree, @wemi3 Colormaps and ColorSequences are different things, and what you're looking for is at
matplotlib/lib/matplotlib/cm.py
Line 59 in 8fc7da4
class ColormapRegistry(Mapping): |
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.
My mistake, should be fixed now!
This seems really useful. Would you consider adding this https://matplotlib.org/stable/users/explain/colors/colormap-manipulation.html#registering-a-colormap and at https://matplotlib.org/stable/users/explain/colors/colormaps.html? Not mandatory, but would be a help. |
@story645 Would I be able to work on the issues that will be spun off? |
@0taj sure - you don't even have to wait for me to make an issue. You can directly create a pull request that adds instructions on seeing all colormaps to the places @jklymak mentioned in #26930 (comment) |
…t of registered colormaps re: issue matplotlib#26244
…t of registered colormaps re: issue matplotlib#26244
Thank you for the pull request @wemi3, hope to see you again! |
PR summary
References issue #26244
Added documentation as described in #26244 (comment) to matplotlib.colormaps docs and the top of choosing colormaps tutorial.
The documentation added to each doc is:
PR checklist