Groups
Groups
Sign in
Groups
Groups
ggplot2
Conversations
About
Send feedback
Help
scale_colour_manual using part of scale_colour_brewer
72 views
Skip to first unread message
Keith G.
unread,
Oct 12, 2009, 3:53:57 PM
10/12/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
I'd like to use a colour scale that is composed of the 8 colours from
a brewer scale, plus black as the last colour.
Can someone point me in the right direction?
Thanks!
Keith
baptiste auguie
unread,
Oct 13, 2009, 2:18:27 AM
10/13/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Keith G., ggplot2
Hi,
Try this,
library(RColorBrewer)
qplot(x,y, data=data.frame(x=1:9,y=1:9), colour=factor(x),size=I(5)) +
scale_colour_manual(values = c(brewer.pal(8, "Set1"),"black"))
HTH,
baptiste
Reply all
Reply to author
Forward
0 new messages