Adding midpoint coloring
- Dominant language
- JavaScript
- Stars
- 56
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if there was support for diverging colormaps (vmin, vcenter and vmax) as done in matplotlib's [TwoSlopeNorm](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.TwoSlopeNorm.html#matplotlib.colors.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.

Also note that this has been raised in emperor before.
https://github.com/biocore/emperor/issues/708
Contributor guide
Research direction
No file or test is named in the issue. Start by locating Empress's colormap and color-legend handling, then review the linked Emperor issue and matplotlib's TwoSlopeNorm behavior. Done means diverging colormaps can use vmin, vcenter, and vmax so separate profiles share the intended midpoint and aligned colors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100