Home > front end >  Default colormap in Matplotlib
Default colormap in Matplotlib

Time:04-05

While working with the matplotlib, when I got to the colormap, I realized that the default colormap is jet colormap, but I heard that this choice is not very good. Can someone tell me the reason or is there a reason that this was chosen by default?

CodePudding user response:

The current default colormap is 'Viridis'. For an introduction to color theory and how 'viridis' was generated watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015. Watch: https://www.youtube.com/watch?v=xAoljeRJ3lU&t=2s

CodePudding user response:

the most commonly used "jet" colormap  (also known as "rainbow") is a poor choice for a variety of reasons.

  1. When printed in black and white, it doesn't work.
  2. For colorblind persons, it doesn't work properly.
  3. Not linear in color space, so it’s hard to estimate numerical values from the resulting image.

And 'jet' is no more the default colormap in matplotlib. 'Viridis' is the new default colormap from Matplotlib 2.0 onwards.

  • Related