I agree with the other respondents regarding the distinguishability of
color differences when you have a palette with a large number of
colors, but if you insist, you could look into the colorRampPalette()
function, several of the predefined palette functions (e.g.,
rainbow(), topo.colors(), terrain.colors()) and the colorspace
package...and then confirm the warning :)
Here is a toy example for illustration:
library(ggplot2)
qplot(LETTERS[1:5], geom = "bar", fill = LETTERS[1:5]) +
coord_polar() + scale_fill_manual(values = rainbow(5))
qplot(LETTERS[1:25], geom = "bar", fill = LETTERS[1:25]) +
coord_polar() + scale_fill_manual(values = rainbow(25))
# Same idea, different palette
qplot(LETTERS[1:25], geom = "bar", fill = LETTERS[1:25]) +
coord_polar() +
scale_fill_manual(values = colorRampPalette(c("navy", "yellow"))(25))
Dennis