Open apcamargo opened 5 years ago
@apcamargo This is by design. Besides being colorblind friendly, the color maps included in viridis are meant to be "perceptually-uniform, both in regular form and also when converted to black-and-white". A diverging color map would not be perceptually uniform when converted to black-and-white/gray levels (i.e. the same level of gray would end up representing two different values on each side of the midpoint).
@sjmgarnier Thanks for the reply. I understand your point concerning the diverging colormaps, I didn't know that this was a design choice.
What do you think of the inclusion of twilight
(circular) and mako
/rocket
(sequential), though? They're all perceptually-uniform in grayscale.
@apcamargo twilight goes white-black-white in grayscale: here again the same level of gray ends up representing two different values on each side of the midpoint. Mako looks very similar to viridis and mako to magma, no? Though if they are actually different, sure, we can include them.
@apcamargo I think maybe a more useful thing to do would be to port viscm to R using Shiny. @njsmith and @stefanv may be able to tell us if someone has already started working on this. If not, we could get this started.
@sjmgarnier Having the same level of gray in both ends is precisely the point of this colormap. As a circular colormap, twilight starts and ends on the same color (this happens even in the colored version). It's very useful to represent cyclic data, such as time.
As for mako, it looks quite different from viridis:
What do you think?
With diverging colormaps, you probably don't ever want to convert to black-and-white; but if you do, it should go dark-to-light-to-dark (or the other way around). This is by design.
Mako looks quite nice; a bit less vivid than viridis, more of that eerie plasma
feeling. And its color delta and colorblind simulation looks good in viscm too.
Anyone who is interested in this topic should make a point of reading Peter Kovesi's paper: https://arxiv.org/pdf/1509.03700.pdf
@apcamargo Yes, you're right, rocket and mako are different enough now that I look at them side by side on something else than my cell phone. I'm happy including them in viridis (and viridisLite on which viridis is based).
Regarding twilight, I think it doesn't conform with the general philosophy behind viridis. But I get why these color maps can be useful, so this could warrant the creation of a package specifically for circular colormaps. What do you think?
@stefanv Thanks, will give it a read.
Hi @sjmgarnier
I've been using your
viridis
package for some time and I really appreciate your work in it. I feel, however, that it should include diverging colormaps.In version 0.9.0,
seaborn
introduced two new diverging colormaps created withviscm
(icefire
andvlag
). Do you think it would be appropriate to include them intoviridis
andviridisLite
? I can work in a PR.Additionally, we can discuss the inclusion of the
twilight
circular colormap (included inmatplotlib
3.0) and themako
androcks
sequential colormaps (included inseaborn
0.9.0). All of them were created usingviscm
.Thanks!