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

Add new viscm colormaps #61

Open
apcamargo opened this issue Apr 4, 2019 · 8 comments
Open

Add new viscm colormaps #61

apcamargo opened this issue Apr 4, 2019 · 8 comments

Comments

@apcamargo
Copy link

apcamargo commented Apr 4, 2019

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 with viscm(icefire and vlag). Do you think it would be appropriate to include them into viridis and viridisLite? I can work in a PR.

Additionally, we can discuss the inclusion of the twilight circular colormap (included in matplotlib 3.0) and the mako and rocks sequential colormaps (included in seaborn 0.9.0). All of them were created using viscm.

Thanks!

@sjmgarnier
Copy link
Owner

@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).

@apcamargo
Copy link
Author

@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.

@sjmgarnier
Copy link
Owner

@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.

@sjmgarnier
Copy link
Owner

@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.

@apcamargo
Copy link
Author

apcamargo commented Apr 7, 2019

@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:
index

What do you think?

@stefanv
Copy link

stefanv commented Apr 7, 2019

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

@sjmgarnier
Copy link
Owner

@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?

@sjmgarnier
Copy link
Owner

@stefanv Thanks, will give it a read.

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

No branches or pull requests

3 participants