Re: [R] Legends in xyplot

2006-01-17 Thread Deepayan Sarkar
On 1/17/06, Ravi Varadhan <[EMAIL PROTECTED]> wrote: > Hi Uwe, > > I am aware of the "legend" option in xyplot, but I can't figure out how to > make it work. In particular, I do not understand how to use "legend" along > with the "key" argument. For my example, I would like to have a legend box >

Re: [R] Legends in xyplot

2006-01-17 Thread Ravi Varadhan
gt; Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] Legends in xyplot > > See ?xyplot and its argument "legend". > > Uwe Ligges > > > > > Ravi Varadhan wrote: > > > Hi, > > > > > > > > How can I add legends in the "xypl

Re: [R] Legends in xyplot

2006-01-17 Thread Uwe Ligges
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

[R] Legends in xyplot

2006-01-16 Thread Ravi Varadhan
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',