Scott, I asked this same question a few years back, here's what Deepayan wrote. I think the last hint about scales will help you --Seth
On 5/9/07, Seth W Bigelow <sbige...@fs.f...> wrote: > > I would like to remove the outermost box from my wireframe plots -- this is > the box that is automatically generated, and is not the inner cube that > frames the data. There was a thread on this 4 yrs ago but none of the fixes > work (e.g., grid.newpage(), grid.lines(gp = gpar(col = NA)) or > par.box=list(col=1),col=NA. These just make the data or the cube disappear. > Has anyone solved this issue? > Here's some sample code. In case you are wondering, I have indeed purchased > Paul Murrel's book. But have you looked at example(wireframe)? The last example is what you want. You might also want to add scales = list(col = "black") to the call. -Deepayan Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbige...@fs.fed.us / ph. 530 759 1718 "Waichler, Scott R" <scott.waich...@pnl.gov> 03/16/2010 05:12 PM To Seth W Bigelow <sbige...@fs.fed.us> cc Subject RE: R-help Digest, Vol 85, Issue 16 Seth, Thank for you for the suggestion. I found that the axis.line setting does get rid of the panel border, but unfortunately also the tick marks that go with the bounding box (but not the bounding box itself). The clip command doesn?t seem to do anything. Below is the code I?m using for testing. Scott Waichler # Test script for figuring out how to use contour3d and wireframe together. # # source("/projects/rifle/scripts/test_3d.r") library(lattice) library(misc3d) xlim <- c(7, 18) ylim <- c(0, 10) zlim <- c(1613.22, 1619.52) z.ticks <- rev(seq(gs, wasatch, by=-1)) z.tick.labels <- gs - z.ticks pdf(file = ?test_3d.pdf", paper="special", width=7.5, height=6, pointsize=12) # Note about screen settings, which determine point of view: After each rotation, new axes are defined for # the next rotation as at the start: x is to the right of the 2D view, y is towards the top, and z # is positive out of the page towards you. Rotations follow the right-hand rule: positive angles follow # curved fingers of right hand, with thumb pointing in positive direction of associated axis. w <- wireframe(matrix(zlim[1], 2, 2) ~ rep(xlim,2)*rep(ylim,each=2), xlim = xlim, ylim = ylim, zlim = zlim, aspect=c(diff(ylim) / diff(xlim), diff(zlim) / diff(xlim)), xlab = "X (m)", ylab = "Y (m)", zlab = "Z (m)", scales = list(arrows = FALSE, z=list(at = z.ticks, labels = z.tick.labels)), #zoom=1.05, panel.aspect=0.75, par.settings = list(#box.3d = list(col = "transparent", alpha = 0), # remove the axes axis.line = list(col = "transparent") # remove the panel border ), #screen=list(x=-90, y=-40), # looking from side screen=list(x=-100, y=-40, z=5), # looking from side and slightly up main="Testing with /projects/rifle/scripts/test_3d.r", panel.3d.wireframe = function(x, y, z, rot.mat, distance, xlim.scaled, ylim.scaled, zlim.scaled, ...) { scale <- c(diff(xlim.scaled) / diff(xlim), diff(ylim.scaled) / diff(ylim), diff(zlim.scaled) / diff(zlim)) shift <- c(mean(xlim.scaled) - mean(xlim) * scale[1], mean(ylim.scaled) - mean(ylim) * scale[2], mean(zlim.scaled) - mean(zlim) * scale[3]) if(!is.na((isoc[[nc]][[ic]][[j]])[1])) { P <- rbind(cbind(diag(scale), shift), c(0, 0, 0, 1)) rot.mat <- rot.mat %*% P #drawScene(isoc[[nc]][[ic]][[j]], R.mat = rot.mat, screen = NULL, # distance = distance, add = TRUE, scale = FALSE, # light = c(.5,0,1), engine = "grid") } } ) print(w) dev.off() From: Seth W Bigelow [mailto:sbige...@fs.fed.us] Sent: Tuesday, March 16, 2010 2:12 PM To: Waichler, Scott R Cc: r-help@r-project.org Subject: Re: R-help Digest, Vol 85, Issue 16 Scott: This may work for you. Just include the statement par.settings <- par.set1 in your wire graph statement par.set1 <-list( axis.line=list(col="transparent"), # Get rid of box around fig? clip=list(panel=FALSE), # disarm lurking panel settings? ) Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbige...@fs.fed.us / ph. 530 759 1718 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.