Skip to content
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

Make default colormap consistent with matplotlib (jet -> viridis/coolwarm) #55

Closed
jgd10 opened this issue Jul 1, 2021 · 2 comments · Fixed by #106
Closed

Make default colormap consistent with matplotlib (jet -> viridis/coolwarm) #55

jgd10 opened this issue Jul 1, 2021 · 2 comments · Fixed by #106
Labels
enhancement New feature or request

Comments

@jgd10
Copy link
Contributor

jgd10 commented Jul 1, 2021

Several years ago matplotlib shifted from using the colormap jet as its default, which was a legacy from when it imitated MATLAB.

jet is an extremely flawed and problematic colormap that should be avoided if possible (see below for details).

Matplotlib's change was precipitated by MATLAB shifting their default to parula, a more perceptually uniform colormap, for the above reasons. MATLAB copyrighted this colormap so matplotlib couldn't use it, as such they devised their own default and made it freely available to anyone, and everyone, who wishes to use it, viridis.

Matplotlib have detailed their logic in changing away from jet and choosing viridis in a great talk I would recommend watching, which can be found here. There is also a blog post to go along with it, which can be read here.

The issue

jet is not perceptually uniform; the rate of change of data is not proportional to the rate of change of lightness of color, in fact it is quite non-linear. In addition it is not color-blind friendly. jet distorts data.

We should stop using jet as our default and shift to either viridis, (because viridis is the chosen default of matplotlib, bringing us in line with them), or to coolwarm. coolwarm should be considered because there has been research into which colormap looks best in 3D space, and divergent colormaps are generally considered superior. coolwarm is considered the best of the divergent colormaps (see here for details).

coolwarm is the default in Paraview for comparison.

Online resources

Literature

  • Rainbow Color Map (Still) Considered Harmful’ in IEEE Computer Graphics and Applications, vol. 27, no. 2, pp. 14-17, March-April 2007.

  • "Evaluation of Artery Visualizations for Heart Disease Diagnosis", Frank Rybicki, Simone Melchionna, Michelle Borkin, Hanspeter Pfister, Charles Feldman, Dimitrios Mitsouras, Krzysztof Gajos, Amanda Peters, IEEE Transactions on Visualization & Computer Graphics vol. 17 no. undefined, p. 2479-2488, Dec., 2011

  • ‘Using color to code quantity in spatial displays.’ Spence, Ian; Kutlesa, Natasha; Rose, David L. Journal of Experimental Psychology: Applied, Vol 5(4), Dec 1999, 393-412

  • Rainbow Color Map Critiques: An Overview and Annotated Bibliography By Steve Eddins, MathWorks *

  • "Data visualization: the end of the rainbow," B. E. Rogowitz and L. A. Treinish, in IEEE Spectrum, vol. 35, no. 12, pp. 52-59, Dec 1998.

  • Diverging color maps for scientific visualization - K. Moreland 2009, pp 92-103

  • ColorBrewer.org: An Online Tool for Selecting Colour Schemes for Maps, The Cartographic Journal, 2003, pp 21-37

@jgd10 jgd10 added the enhancement New feature or request label Jul 1, 2021
@akaszynski
Copy link
Collaborator

I don't like jet either, but it's something that Ansys loves using. I'm curious what other users want as default, but in general, I agree with your findings.

pyvista doesn't use jet as default either.

@jgd10 jgd10 closed this as completed Jul 1, 2021
@jgd10 jgd10 reopened this Jul 1, 2021
@jgd10
Copy link
Contributor Author

jgd10 commented Jul 1, 2021

(closed by accident)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants