[R] ggplot2 avoid automatic color selection
Ista Zahn
izahn at psych.rochester.edu
Fri Jun 10 16:02:18 CEST 2011
See ?scale_colour_manual
Best,
Ista
On Fri, Jun 10, 2011 at 9:55 AM, Immanuel B <mane.desk at googlemail.com> wrote:
> Hey all,
>
> I'm trying to replicate some plots with ggplot2. The problem is that I
> need to specify the color for every
> attribute (drug). If I use the code below the colors get automatically
> assigned but I need to plot drug1 in black drug2 in blue
> etc.
> How do I do that?
>
> q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point"))
>
> best regards,
> Immanuel
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
More information about the R-help
mailing list