Skip to content
Back to formatted view

Raw Message

Message-ID: <CALHZe3MRqhCUNEi7fCGwdJgffO9o3HijuNw3_2wj8P915L=Rog@mail.gmail.com>
Date: 2013-02-01T22:07:37Z
From: Soyeon Kim
Subject: Change default order of colors & line types

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,