On 8/31/07, Christof Bigler <[EMAIL PROTECTED]> wrote:
> The suggestions by Deepayan Sarkar and Hadley Wickham work for that
> case, but I get into troubles when I try to draw e.g. a panel for "A"
> and "B":
>
> xyplot(y ~ x | f , groups=g, data=tmp,type="l",
> par.settings=list(superpose.line=list(col=c("red","blue"))),
> auto.key=list(space="top",
> text=levels(tmp$f),points=FALSE,lines=TRUE))
In ggplot, you would need to specify the grouping variable as well as
the colour variable:
qplot(x, y, data=tmp, geom="line", colour=f, group=interaction(f,g))
which should work for any facetting.
Hadley
______________________________________________
[email protected] 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.