biocore / empress

A fast and scalable phylogenetic tree viewer for microbiome data analysis
BSD 3-Clause "New" or "Revised" License
45 stars 31 forks source link

Center diverging colormaps at 0 #518

Open jwdebelius opened 3 years ago

jwdebelius commented 3 years ago

Hi Empress team,

I'm enjoying this a lot so far!

Right now, I have a colormap between -1.49 to 1.69, centered at 0.1. Which is okay-ish, but slightly visually confusing.

Im wondering if it would be possible here (an possibly in emperor) to center diverging colormaps (maybe a as a check box?). I think it is more intuitive that positive values are all one color (say red) and negative values are all another (blue), with equal color weight.

The proposed behavior would take 0-centered colormap, which I usually approach in other settings by finding find the most extreme upper/lower value, and set the colormap to reflect that.

Thanks! Justine

gibsramen commented 3 years ago

Hi, @jwdebelius

This is definitely on our radar - see https://github.com/biocore/empress/issues/365#issuecomment-729897107. Would you prefer your proposed checkbox approach to specifying numerical values for end/midpoints?

jwdebelius commented 3 years ago

Hi @gibsramen,

I'm glad to know I'm not the only one. I really like the colorbrewer colormap, so the ability to say show RdBu scaled between -1.75 and 1.75 would kind of be my idea. That automatically sets my central value, and lets me line up with colormaps that might exist elsewhere.

fedarko commented 3 years ago

Agreed -- it would be great to have this in. I'll see if we can get it added in soon :)