Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions galleries/users_explain/colors/colormaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
help on creating your own colormaps, see
:ref:`colormap-manipulation`.

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

from matplotlib import colormaps
list(colormaps)

Overview
========

Expand Down
5 changes: 5 additions & 0 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ class ColorSequenceRegistry(Mapping):
`.ColorSequenceRegistry.register`::

mpl.color_sequences.register('rgb', ['r', 'g', 'b'])

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

from matplotlib import colormaps
list(colormaps)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

"""

_BUILTIN_COLOR_SEQUENCES = {
Expand Down