empress icon indicating copy to clipboard operation
empress copied to clipboard

Adding midpoint coloring

Open mortonjt opened this issue 2 years ago • 1 comments

It would be great if there was support for diverging colormaps (vmin, vcenter and vmax) as done in matplotlib's TwoSlopeNorm. I think this use-case will become increasing common for publishing Empress figures in high impact venues that require fine-tuning of color legends.

To see what I mean, consider the following - I have two different differential abundance profiles that I want to compare, but because of the inability to put them on a common scale, the colors don't align (they are centered at -0.36 and -1.78 respectively when they should both be centered at zero). In my particular case, this is actually a blocking issue.

image

Also note that this has been raised in emperor before.

https://github.com/biocore/emperor/issues/708

mortonjt avatar Feb 02 '22 16:02 mortonjt

zoops, just realized that this is partially implemented here : https://github.com/biocore/empress/pull/484 https://github.com/biocore/empress/pull/521

And has been mentioned in https://github.com/biocore/empress/issues/365 https://github.com/biocore/empress/issues/518 and https://github.com/biocore/empress/issues/529 will follow up with midpoint coloring in a sec

mortonjt avatar Feb 02 '22 16:02 mortonjt