Re: [R] placing rectangle behind plot

2006-08-01 Thread Paul Murrell
Hi Gabor Grothendieck wrote: Thanks. That's helpful. I would be interested in the case where 1. one does not have a variable latticeplot, as per your example, but just has the output of xyplot(x ~ x | gl(2,1), layout = 1:2) sitting on the screen, having been printed by a prior

Re: [R] placing rectangle behind plot

2006-07-31 Thread Greg Snow
PROTECTED] on behalf of Gabor Grothendieck Sent: Sat 7/29/2006 3:20 PM To: RHelp Subject: [R] placing rectangle behind plot I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except

Re: [R] placing rectangle behind plot

2006-07-30 Thread Paul Murrell
Hi Gabor Grothendieck wrote: I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and obscures a portion of the chart. I also tried adding col =

Re: [R] placing rectangle behind plot

2006-07-30 Thread Gabor Grothendieck
Thanks. That's helpful. I would be interested in the case where 1. one does not have a variable latticeplot, as per your example, but just has the output of xyplot(x ~ x | gl(2,1), layout = 1:2) sitting on the screen, having been printed by a prior function. We can assume that no other

Re: [R] placing rectangle behind plot

2006-07-30 Thread Gabor Grothendieck
Just to answer my own question I just discovered trellis.panelArgs() and that can be used to give the following solution: library(lattice) library(grid) x - 1:10 xyplot(x ~ x | gl(2,1), layout = 1:2) trellis.focus(panel, 1, 1) grid.rect(w = 0.5, gp = gpar(fill = light grey)) #

[R] placing rectangle behind plot

2006-07-29 Thread Gabor Grothendieck
I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and obscures a portion of the chart. I also tried adding col = transparent to the gpar list but that

Re: [R] placing rectangle behind plot

2006-07-29 Thread Sebastian P. Luque
Hi Gabor, On Sat, 29 Jul 2006 17:20:29 -0400, Gabor Grothendieck [EMAIL PROTECTED] wrote: I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and

Re: [R] placing rectangle behind plot

2006-07-29 Thread Gabor Grothendieck
The reason I explicitly specified in the problem that the rectangle should not be drawn first is that the xyplot is issued as part of a larger routine that I don't want to modify. On 7/29/06, Sebastian P. Luque [EMAIL PROTECTED] wrote: Hi Gabor, On Sat, 29 Jul 2006 17:20:29 -0400, Gabor