-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Since version 2.0, matplotlib has done a good job encouraging users to use perceptually uniform colormaps, distinguishing between divergent and sequential colormaps, etc. In my job, I find divergent colormaps very useful; there is a good selection of them, but they all have a very light "zero" colour: typically white or yellow, except one which is light gray. They can be seen here. This is an example of what can be done:
With the explosion of "dark mode" in apps, websites and in the tastes of end-users, it would be very nice to have a divergent colormap that has a dark default colour.
Proposed Solution
To add two or more colormaps which fulfill all the conditions of divergent colormaps, but have a dark colour as a middle colour. At least one of these should use pure black.
Additional context and prior art
Currently, the closest approximation is plt.cmap.twilight
, however, it does not look sufficiently symmetric to me. Moreover, it's cyclic, so it ends with the same colour on both sides, which is undesirable. This is how it looks like:
It's quite close to what I'm suggesting, except for the details I mentioned above (and I would add one or two more, including at least one with a black background).