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

Center the divergent palette by 0 #121

Closed
albert-ying opened this issue Mar 16, 2022 · 1 comment
Closed

Center the divergent palette by 0 #121

albert-ying opened this issue Mar 16, 2022 · 1 comment

Comments

@albert-ying
Copy link

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

@EmilHvitfeldt
Copy link
Owner

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/

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

2 participants