Re: [R] Legends in xyplot

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Tue 17 Jan 2006 - 19:08:07 EST

See ?xyplot and its argument "legend".

Uwe Ligges

Ravi Varadhan wrote:

> Hi,
>
>
>
> How can I add legends in the "xyplot" function, in the "lattice" library?
> Here is a simulation example:
>
>
>
> x <- runif(90)
>
> z <- sample(1:3, 90, rep=T)
>
> y <- rnorm(90, mean = x^2 + z, sd=1)
>
>
>
> library(lattice)
>
> trellis.par.set(col.whitebg())
>
> xyplot(y ~x, groups=as.factor(z), type = c('p', 'smooth'), span = .67)
>
>
>
> Thanks in advance,
>
> Ravi.
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jan 17 19:17:33 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:04 EST