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

Skip to content

ENH: add modified CMRmap colormap with improved linearity #5172

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
wants to merge 2 commits into from

Conversation

zblz
Copy link
Member

@zblz zblz commented Oct 3, 2015

The CMRmap colormap has some linearity problems as seen in the Choosing Colormaps page. In 2012, Christopher Hummerstone uploaded to the mathworks file exchange a tweaked version of CMRmap with improved linearity. It is by no means perfect (there is still a kink in the red-orange transition), but better than the original. I think it's worth being in matplotlib because: a) there are no sequential colormaps from black to white and several different colors in between (blue-red-orange), b) it holds well under colorblindness tests. I have added it here with name CMRmap2.

Luminosity profile of this version with the code used in the Choosing Colormaps page:
miscellaneous

In my opinion, this version could outright replace CMRmap (maybe having the original CMRmap as CMRmap_legacy, as discussed in #4681 for the perceptually correct blues), but this would slightly change existing code output.

@tacaswell tacaswell added this to the next major release (2.0) milestone Oct 3, 2015
@efiring
Copy link
Member

efiring commented Oct 3, 2015

As an alternative, have you looked into using pycam02ucs to generate a map with similar properties but without the kinks? It looks like the color sequence is similar to that in the new magma, inferno, and plasma maps.

@zblz
Copy link
Member Author

zblz commented Oct 3, 2015

@efiring: I had forgotten that the other options in the new colormap contest got into matplotlib as well! You are right, it is quite similar to magma and inferno in color sequence and plasma seems to be a subset of it. Magma and inferno have more muted colors compared to CMRmap, but I imagine that's the price to pay for linearity.

Since it would be redundant with those, I think it's better to drop this.

@zblz zblz closed this Oct 3, 2015
@zblz zblz deleted the new-CMRmap branch October 8, 2015 17:38
@QuLogic QuLogic modified the milestones: unassigned, 2.0 (style change major release) Oct 16, 2016
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.

4 participants