[R] wireframe: how to remove the frame around my plot?

Deepayan Sarkar deepayansarkar at vsnl.net
Fri Jul 25 15:20:23 CEST 2003


On Thursday 24 July 2003 20:26, Uwe Ligges wrote:
> Jerome Asselin wrote:
> > You can specify some options in "par.box". Use col=NA to make the frame
> > transparent. See example below (which was modified from the help file).
> > See also the "scales" parameter if you want to remove the arrows as well.
> >
> > Cheers,
> > Jerome
> >
> >      library(lattice)
> >      x <- seq(-pi, pi, len = 20)
> >      y <- seq(-pi, pi, len = 20)
> >      g <- expand.grid(x = x, y = y)
> >      g$z <- sin(sqrt(g$x^2 + g$y^2))
> >      wireframe(z ~ x * y, g, drape = TRUE,
> >                perspective = FALSE,
> >                aspect = c(3,1), colorkey = FALSE,
> >                par.box = list(col=NA))
>
> Which doesn't work on device
>  trellis.device(windows)
> but works well on, e.g.,
>  trellis.device(postscript)
>
> Deepayan, since I don't have the time to check that right now: Is this
> bug known? Is this a bug in R, grid or lattice?

Not sure, and I don't have access to R on Windows right now. This is probably 
a grid issue, try doing 

grid.newpage()
grid.lines(gp = gpar(col = NA))

But I think col="transparent" would be a better choice than col=NA here. Does 
that work on windows() ?

Deepayan




More information about the R-help mailing list