Re: [R] xyplot with grid?

2007-05-09 Thread Deepayan Sarkar
On 5/9/07, Gav Wood <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > Add the argument > > > >type = c("p", "g") > > > > to your xyplot call. > > So what's the easiest way to place a line at x=3 (ala "abline(v=3)") to > the graph? xyplot(x~y,data.frame(x=1:9,y=1:9,z=sort(rep(c('A','B'

Re: [R] xyplot with grid?

2007-05-09 Thread Gabor Grothendieck
You can do it via panel= or after the fact with trellis.focus...trellis.unfocus. The following illstrates both. The panel= function adds a vertical line at 3 and after the fact we add a vertical line at 6. pnl <- function(...) { panel.abline(v = 3) panel.xyplot(...) } xyplot(x~y,data.frame

Re: [R] xyplot with grid?

2007-05-09 Thread Gav Wood
Gabor Grothendieck wrote: > Add the argument > >type = c("p", "g") > > to your xyplot call. So what's the easiest way to place a line at x=3 (ala "abline(v=3)") to the graph? After calling the xyplot call, the panel.* functions seem to work only in device coordinates. Thanks for the help,

Re: [R] xyplot with grid?

2007-05-09 Thread Gabor Grothendieck
Add the argument type = c("p", "g") to your xyplot call. On 5/9/07, Gav Wood <[EMAIL PROTECTED]> wrote: > > Giving a reproducible example would be a good start. > > Ok, what's the easiest way to get a grid (ala grid()) on this graph? > > xyplot(x~y,data.frame(x=1:9,y=1:9,z=sort(rep(c('A','B

Re: [R] xyplot with grid?

2007-05-09 Thread Deepayan Sarkar
On 5/9/07, Gav Wood <[EMAIL PROTECTED]> wrote: > > Giving a reproducible example would be a good start. > > Ok, what's the easiest way to get a grid (ala grid()) on this graph? > > xyplot(x~y,data.frame(x=1:9,y=1:9,z=sort(rep(c('A','B','C'),3))), > groups=z,auto.key=list(columns=3)) xyplot(x~

Re: [R] xyplot with grid?

2007-05-09 Thread Gavin Simpson
On Wed, 2007-05-09 at 19:13 +0100, Gav Wood wrote: > > Giving a reproducible example would be a good start. > > Ok, what's the easiest way to get a grid (ala grid()) on this graph? > > xyplot(x~y,data.frame(x=1:9,y=1:9,z=sort(rep(c('A','B','C'),3))), > groups=z,auto.key=list(columns=3)) > >

Re: [R] xyplot with grid?

2007-05-09 Thread Gav Wood
> Giving a reproducible example would be a good start. Ok, what's the easiest way to get a grid (ala grid()) on this graph? xyplot(x~y,data.frame(x=1:9,y=1:9,z=sort(rep(c('A','B','C'),3))), groups=z,auto.key=list(columns=3)) Bish bosh, Gav __ R-

Re: [R] xyplot with grid?

2007-05-09 Thread Deepayan Sarkar
On 5/9/07, Gav Wood <[EMAIL PROTECTED]> wrote: > Hello folks, > > So I'd like to use the lattice xyplot function, but here's the thing; > I'd like a grid on it and a bit of annotation (line and text). > > So I tried just using the panel.grid, panel.text and panel.line but they > didn't work after t

[R] xyplot with grid?

2007-05-09 Thread Gav Wood
Hello folks, So I'd like to use the lattice xyplot function, but here's the thing; I'd like a grid on it and a bit of annotation (line and text). So I tried just using the panel.grid, panel.text and panel.line but they didn't work after the plot had been called seemingly using the device coord