[R] Screen settings for point of view in lattice and misc3d

Deepayan Sarkar deepayan.sarkar at gmail.com
Sat Mar 6 08:15:46 CET 2010


On Wed, Mar 3, 2010 at 1:22 PM, Waichler, Scott R
<Scott.Waichler at pnl.gov> wrote:
> I'm making some 3D plots with contour3d from misc3d and wireframe from lattice.  I want to view them from below; i.e. the negative z-axis.  I can't figure out how to do so.  I would like my point of view looking up from below, with the z, y, and x axes positive going away.  Can anyone tell me the correct settings for screen to achieve this?  Here is what I've found so far:
>
>  screen=list(z=-40, x=-60, y=0), # looking down and away in negative x direction
>  screen=list(z=40, x=60, y=0),  # domain turned upside down, looking up and away in neg. x direction
>  screen=list(z=-40, x=60, y=0),  # domain turned upside down, looking up and away in pos. x direction
>  screen=list(z=40, x=-60, y=0),     # looking down and away in positive x direction

The initial view is along the positive z-axis:

wireframe(volcano, shade = TRUE, screen = list())

To change it to the negative z-axis, rotate by 180 along the x-axis:

wireframe(volcano, shade = TRUE, screen = list(x = 180))

Then, add any further adjustments you wish:

wireframe(volcano, shade = TRUE, screen = list(x = 180, z = -30, x = -30))

-Deepayan



More information about the R-help mailing list