[R] Change default order of colors & line types
Soyeon Kim
soyeon.sophia.kim at gmail.com
Fri Feb 1 22:41:17 CET 2013
Dear R users,
I'd like to change the default order of colors & line types.
Especially I am using ggplot2 and using color Set1.
In Set1, the default color order is red, blue, green, violet,.. ect.
However, I want to put red in fourth (not first).
Likewise, I want to change the order of default linetype. I want to
put "solid" line in fourth.
How can I do thses?
R code to draw the graph is
qplot(variable, power, data = m.powers, colour = method,
linetype=method, ylab = "Power") + geom_line(aes(group = method),
ylim = c(0,1)) +
scale_colour_brewer(palette="Set1")
Thank you,
More information about the R-help
mailing list