[R] lattice: shape of box around wireframe

Thomas Roth thomas.k.roth at googlemail.com
Fri Dec 18 14:52:09 CET 2009


Hi,

Thank you for the quick answer...

I made a small example:

require(lattice)
x = 1:100
x = numeric(0)
z = numeric(0)
y = numeric(0)
for(i in 1:100)
{
  y = c(y,1:i)
  x = c(x, rep(i,i))
  z = x + y
} 

#omitted bounding box
wireframe(z ~ x*y, par.box = c(col = "transparent"))

#needed: rectangular bounding box
wireframe(z ~ x*y)


now what i'm looking for is a rectangular bounding box but I don't know where to start...

Thomas

-----Ursprüngliche Nachricht-----
Von: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Gesendet: Freitag, 18. Dezember 2009 14:29
An: Thomas Roth
Cc: r-help at r-project.org
Betreff: Re: [R] lattice: shape of box around wireframe

On Fri, Dec 18, 2009 at 5:19 AM, Thomas Roth
<thomas.k.roth at googlemail.com> wrote:
> Hi,
>
> I was wondering if there is a way to adjust the shape of the box around the
> wireframe. By default this box is always a cube. For instance, is it
> possible to cut this cube into two halfs each half being a 3d rectangle? Or
> just plot a 3d rectangle with a wireframe inside and adjusted axes?
>
> So far I've read "Lattice: Multivariate Data Visualization with R" and
> searched through the mailing list.

User-level control of the display is at the level of (1) either the
panel function, which is somewhat non-trivial for the 3-D functions,
or (2) the 'panel.3d.wireframe' function (for wireframe), where you
can basically do anything after the axes and the transformations have
been set up. There are examples both in the book and on the
r-help/r-devel lists. Let me know if you need help in figuring out any
specific details (such as how to omit the default bounding box by
setting its color to transparent).

-Deepayan




More information about the R-help mailing list