[R] Remove wireframe outer box but keep ticks

Bigelow, Seth W -FS sbigelow at fs.fed.us
Fri Mar 23 21:07:28 CET 2012


ilai/keren:

Thanks for your response. It's not the 3d bounding box that I wish to eliminate, but the box that surrounds the whole figure and is drawn automatically (I call this the outer box, in contrast to the inner, 3d bounding box). The ticks attached to the bounding box are connected, in the software, to the outer box. I'm assembling a number of these graphs on one page, and the outer box makes the whole figure look clunky. Lattice is an incredible piece of software! but these small details can be difficult to nail down.

--Seth

-----Original Message-----
From: ilaik9 at gmail.com [mailto:ilaik9 at gmail.com] On Behalf Of ilai
Sent: Friday, March 23, 2012 11:10 AM
To: Bigelow, Seth W -FS
Cc: r-help at r-project.org
Subject: Re: [R] Remove wireframe outer box but keep ticks

See 'box.3d' in trellis.par.get() :

 wireframe(z ~ x*y, data = test,
 scales=list(arrows=F),
 par.settings = list(box.3d = list(col=NA)))

Note you can have some finer control:

wireframe(z ~ x*y, data = test,
scales=list(arrows=F),
par.settings = list(box.3d = list(col=c(1,2,NA,NA,3,NA,4,5,6)))
)

Hope this helps


On Fri, Mar 23, 2012 at 3:59 AM, Bigelow, Seth W -FS <sbigelow at fs.fed.us> wrote:
> I would like to eliminate the outer box around a lattice wireframe 
> graph, but the usual recommended solution, which is to assign a color of 'transparent' to the axis.line parameter, eliminates ticks if the 'arrows=F' command is used, as shown in the following example:
>
> test = data.frame(expand.grid(c(1:10), c(1:10))) z = test[,1] + 
> test[,2] test = cbind(test, z)
> names(test) = c("x", "y", "z")
> require(lattice)
> wireframe(z ~ x*y, data = test,
> scales=list(arrows=F),
> par.settings = list(axis.line = list(col = "transparent")),
> )
>
> Is there a way to eliminate the box but keep the ticks?
>
>
> Seth W. Bigelow, Ph.D.
> Research Ecologist
> USDA-FS Pacific Southwest Research Station
> Ph: (802)-379-3444
>
>
>
>
>
> This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list