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
1 Like
Somehow hadn’t seen that before. Thank you!
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.