-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Two colormaps named "spectral" #879
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
Comments
This is great work! Having a quick colormap reference page in the docs would be awesome. Thanks! I agree the naming is too confusing, but it's too late in the day for me to come up with a better name for either. But I agree whatever we do that aliasing (and deprecating the old name) is a good idea. |
I added the "Spectral" colormap a long time ago while adding all the colormaps from here: http://soliton.vm.bytemark.co.uk/pub/cpt-city/cb/div/index.html DIdn't realize it had the same spelling as an existing colormap (or maybe the "spectral" colormap was added later?) If anyone can suggest a better name I'll rename it (and leave an alias) |
Lowercase ( |
Ok, I found it: http://sourceforge.net/mailarchive/message.php?msg_id=8931272 Originally from neuroimaging project, so rename |
Closed after #921 merge |
Unless I'm really confused, this wasn't solved by #921. Was it changed in some other place? |
You are right, it wasn't. Somehow I thought you had solved all colormap problems. Suggested pull request for this one: as you suggest, make nipy_spectral an alias for spectral (or vice-versa). I think I would then leave the spectral() function--it isn't doing any harm, and it has probably been there for a while--and modify the docstring to note that it is using nipy_spectral. |
hmmm. so there will be
|
Alternative suggestions are welcome, but we can't simply delete spectral() or cm.Spectral or cm.spectral. |
How do I edit the spectral function then? |
You would have to remove "spectral" from the list of cmaps in boilerplate.py, manually add an equivalent function to pyplot.py, and re-run boilerplate.py, which will propagate the first change into pyplot.py. See the boilerplate.py docstring. |
I left the |
Sorted! #1127 has been merged. |
I'm trying to figure out where all the different colormaps came from and document their purpose, and I noticed that there is a
spectral
and also aSpectral
, which are not the same thing:Maybe one should be renamed? Or kept for backwards compatibility and given an alias to differentiate them?
The text was updated successfully, but these errors were encountered: