EmilHvitfeldt/paletteer

Center the divergent palette by 0

albert-ying opened this issue · 1 comments

Hi, I'm wondering if it is possible to specify the divergent continuous palette to be centered by 0?

I tried paletteer::scale_fill_paletteer_c("pals::coolwarm", midpoint = 0) but it doesn't take midpoint argument.

Currently, my plot looks like this -- would be nice if I can set the midpoint in paletteer functions

image

Hello @albert-ying 👋 This has been requested before #50. I'm hesitant to add this before it gets support in ggplot2 directly. Please see tidyverse/ggplot2#3738 for ideas of how to deal with this problem. I also wrote this blogpost about ways to deal with this problem https://www.emilhvitfeldt.com/post/2019-05-21-center-continuous-palettes-in-ggplot2/