Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

wemi3
Copy link
Contributor

@wemi3 wemi3 commented Sep 27, 2023

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:

To get a list of all registered colormaps, you can do::

    from matplotlib import colormaps
    list(colormaps)

PR checklist

Comment on lines 118 to 121
To get a list of all registered colormaps, you can do::

from matplotlib import colormaps
list(colormaps)
Copy link
Member

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.

Copy link
Member

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

class ColormapRegistry(Mapping):

Copy link
Contributor Author

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!

@jklymak
Copy link
Member

jklymak commented Sep 27, 2023

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
Copy link
Member

story645 commented Oct 11, 2023

Sorry that this got dropped. @wemi3 if we don't hear back from you in a day or so about @jklymak's ask, I'll merge this and spin off a follow up issue.

@0taj
Copy link
Contributor

0taj commented Oct 17, 2023

@story645 Would I be able to work on the issues that will be spun off?

@story645
Copy link
Member

story645 commented Oct 17, 2023

@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)

@story645 story645 added this to the v3.8-doc milestone Oct 17, 2023
@story645
Copy link
Member

Thank you for the pull request @wemi3, hope to see you again!

ksunden added a commit that referenced this pull request Oct 17, 2023
…930-on-v3.8.x

Backport PR #26930 on branch v3.8.x (Added documentation on getting full list of registered colormaps re: issue #26244)
@QuLogic QuLogic modified the milestones: v3.8-doc, v3.8.1 Oct 17, 2023
@ksunden ksunden mentioned this pull request Nov 2, 2023
5 tasks
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.

5 participants