A welcome development for matplotlib

Here is a great video, describing viridis, the new default colourmap for matplotlib in the programming language Python. This has some great features – It’s perceptually uniform across its range, it’s pretty, and it works for the colourblind. Oh, and you’re free to use it.

The last five minutes or so describe the process and thinking behind the new colourmap, while the first part of the video is a great description of background colour theory. Many thanks to Nathaniel Smith and Stefan van der Walt. Ed Hawkins has already plotted up some UK climate data, comparing viridis with other colour maps in a simulation of colourblindness. g52 Kevin Anchukaitis (@thirstygecko) has put the colourmap for matlab users up here.

10 comments

  1. […] UK mean temperature data for both normal vision and a simulation of colour blindness. Viridis is a new colour map developed for Python (MATLAB code here) with lots of nice […]

  2. The problem is that science needs to lose more than 10% of its white men. OK, so we can use this colour blindness idea of yours to hinder the progress of a fair bunch of them, but you offer no suggestions on how we might outweigh the inherent prejudices in favour of the other 20% or so that are also surplus to requirements.

    Unfortunately, however, I do agree with the accessibility issue of being able to get good results by printing in greyscale, and I am a matplotlib user, so I’m sure I will try out some of these colour maps next time I upgrade. The actual one they name “viridis” could be reversed for precipitation, but those wanting to emphasise future warming might not like it being so blue-heavy. In their video, they also have some more fiery red and yellow ones, which some climate alarmists might very much enjoy.

  3. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  4. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  5. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  6. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  7. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  8. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  9. […] early years, through blue, green to yellow for most recent years. The colour scale used is called ‘viridis’ and the graphics were made in […]

  10. Jeremy Adler · · Reply

    Compensation for color blindness is not just an inability to differentiate between red and green.
    Firstly the schemes ignore those who lack or have deficient blue vision – they actually make it worse for this smaller group, take away one blue plus one of red-green and you only have, nothing, this group are then totally excluded.
    Secondly the large majority of the red-green color blind are not blind but deficient – one of the photopigments is abnormal but not absent, so they have varyingly altered red-green discrimination, some presumably with improved discrimination – which is not tested for.
    The top end figure of 8% is for Caucasian men but is very much lower for women and lower for other male groups. It is notable that there is no similar emphasis on providing material in a form more accessible to dyslexics.
    Overall the problem is overstated and the solutions are targeted on a general privileged group. They also have as cost for the normally color able, since the new scales inevitably have less overall discrimination and wipes out the blue deficient.
    The practical solution is to also provide images in a greyscale and make it easy for readers to redisplay the images using any scheme they find beneficial, technology should be able to make this practicable for presentations.

Leave a comment