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

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jul 27 16:35:24 MEST 2003


On Sun, 27 Jul 2003, Uwe Ligges wrote:

> [moved to R-devel]
> 
> Uwe Ligges wrote:
> 
> > Deepayan Sarkar wrote:
> > 
> >> 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() ?
> > 
> > 
> > No, thanks.

It does work for me, correctly producing nothing.

> > I'll take a closer look later ....
> 
> Sorry, I do not have the time to look really close, but a *long shot* is 
> that we have discovered a windows-only bug related to the fixed PR#1881.
> Perhaps a similar bug in lattice as it was in R-base?

Not possible: base graphics and grid graphics use the same set of
primitive operations in the graphics drivers.  *However*, there is a bug
in GA_Line (it's col not fgcolor that is NA) seemingly (cvs is down)  
introduced at the same time.  Once cvs is available again I'll commit it.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list