Skip to content

should cm be renamed to colormaps? #1476

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

Closed
ivanov opened this issue Nov 10, 2012 · 3 comments
Closed

should cm be renamed to colormaps? #1476

ivanov opened this issue Nov 10, 2012 · 3 comments

Comments

@ivanov
Copy link
Member

ivanov commented Nov 10, 2012

It's a bit confusing to have a proper module have such a short, non-descriptive name.

Looking at code that uses it, if one were to see from matplotlib import cm - they'd be left wondering what those two letters could possibly stand for. Then further down, they'd see it being used with a keyword argument that would shed some light, such as cmap = cm.RdBu, and they would maybe go through the steps of "oh, it's a map... probably a color map"...maybe...

If the import code was written as from matplotlib import colormaps as cm, it'd be more clear. We would retain the dangling plt.cm and have a dummy matplotlib.cm module which would just import everything from matplotlib.colormaps.

as a bonus, I think plt.colormaps should be retained, but the code and documentation for it should live inside this new colormaps module.

@tacaswell
Copy link
Member

👍 on doing this

@tacaswell tacaswell added this to the v1.5.x milestone Aug 17, 2014
@petehuang
Copy link
Contributor

This is still useful. In the meantime, the docs just need to make sure that any mention of colormap is accompanied by a note saying that the colormap module is indeed named cm. I think this is done fine so far, but something to be aware of.

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
efiring added a commit to efiring/matplotlib that referenced this issue Jun 11, 2018
@efiring
Copy link
Member

efiring commented Apr 27, 2020

Too late. Not worth the disturbance. Decided in the devel meeting on 2020-04-27.

@efiring efiring closed this as completed Apr 27, 2020
@QuLogic QuLogic removed this from the needs sorting milestone Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants