How to specify colour?

4 views
Skip to first unread message

Peng Yu

unread,
Sep 21, 2011, 10:15:17 PM9/21/11
to ggplot2
Hi,

qplot(displ,hwy,data=mpg, colour=cyl) + facet_grid(. ~ cyl)

ggplot2 automatically select colors in the above plot. I want to specify what colors are used in the above plot. I don't find how to do so. Could anybody let me know how to do it?

--
Regards,
Peng

Dennis Murphy

unread,
Sep 21, 2011, 11:25:09 PM9/21/11
to Peng Yu, ggplot2
scale_colour_manual()

Dennis

> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>

Reply all
Reply to author
Forward
0 new messages