In ggplot2
, we can use the midpoint
argument in scale_fill_gradient2()
to set the midpoint of divergence, however this does not exist when I try to use color themes from ggthemes
such as scale_fill_gradient2_tableau()
# A tibble: 6 x 2
Year Value
<chr> <dbl>
1 2002 0.0109
2 2001 -0.0273
3 2000 0.0113
4 1999 0.0148
5 1998 0.00841
6 1997 0.0361
ggplot(df, aes(x = Year, y = Value)) +
geom_col(aes(fill = Value)) +
scale_fill_gradient2_tableau()
I would like the midpoint to be at 0 but now it is at 0.75.