I've been trying to find a color palette that goes from a red to blue gradient. I have used scale_color_gradient(), but are there any palettes in a package that I y'all know of?
Have you tried {RColorBrewer}?
library(RColorBrewer)
library(ggplot2)
display.brewer.all(colorblindFriendly = TRUE) # View all palettes
ggplot(iris, aes(Sepal.Length, Sepal.Width))+
geom_point(aes(color = Species)) +
scale_color_brewer(palette = "RdBu") # Use red/blue palette
Somehow hadn’t seen that before. Thank you!