Hello, I would like to define a color range to custom color some plot, specifically made in ggplot2 (but also for normal plots). I have been trying to use RColorBrewer but I don't get any value out of this function. I expected it would create a vector of color values, but I must be missing something. What is the correct you of this function? Thank you.
EXAMPLE ``` set.seed(50) df = data.frame(x = runif(15, 0, 1), y = x^2 + runif(15, 0, 1), z = rep(1:5, 3)) library(ggplot2) library(RColorBrewer) ggplot(df, aes(x=x, y=y, colour=z, group=z)) + geom_point(size=4) + scale_fill_brewer(palette = "Paired") ``` -- Best regards, Luigi ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.