FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add a method to access the list of registered colormaps · Issue #18490 · matplotlib/matplotlib · GitHub

Repository navigation

Add a method to access the list of registered colormaps #18490

Closed

Description

Describe the issue

I noticed that the linked issues to PR
#16991
all want a public way to access the registered colormap names without resorting to importing pyplot. That PR removed the cm.cmap_d dictionary, but left nothing in its place.

There were a few suggestions in this thread: #16991 (comment)

Summary

Create a way to access the keys of the colormap registry within the mpl.cm module.

Proposed fix

Some ideas:
mpl.cm.get_cmap_names()
mpl.cm.get_registered_cmaps()
keeping consistency with pyplot: mpl.cm.colormaps()
... something else entirely

Activity

  1. added this to the v3.4.0 milestone on Sep 15, 2020
  2. timhoffm commented on Sep 16, 2020

    Member

    IMHO, the colormaps should be accessed via a global colormaps mapping. See #18503 for a rough sketch.

  3. modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL