Waichler, Scott R
2010-Mar-03 21:22 UTC
[R] Screen settings for point of view in lattice and misc3d
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 Scott Waichler Pacific Northwest National Laboratory P.O. Box 999, Richland, WA 99352 scott.waichler at pnl.gov 509-372-4423, 509-341-4051 (cell)
Greg Snow
2010-Mar-04 18:37 UTC
[R] Screen settings for point of view in lattice and misc3d
If I remember correctly, the order in which you specify x, y, and z matters for wireframe, so you may want to try rotating by x first, then z. You may also find the rotate.wireframe function in the TeachingDemos package (make sure that you have also loaded the tcltk package) useful in finding the rotation, it lets you adjust the rotation by using sliders to see the effect, or the tkexamp function in the same package could be used for a different interface. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Waichler, Scott R > Sent: Wednesday, March 03, 2010 2:22 PM > To: r-help at stat.math.ethz.ch > Subject: [R] Screen settings for point of view in lattice and misc3d > > 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 > > > Scott Waichler > Pacific Northwest National Laboratory > P.O. Box 999, Richland, WA 99352 > scott.waichler at pnl.gov > 509-372-4423, 509-341-4051 (cell) > > ______________________________________________ > 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.
Deepayan Sarkar
2010-Mar-06 07:15 UTC
[R] Screen settings for point of view in lattice and misc3d
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 directionThe 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