Message-ID: <4A0BD9B5.1090900@statistik.tu-dortmund.de>
Date: 2009-05-14T08:43:33Z
From: Uwe Ligges
Subject: scatterplot3d
In-Reply-To: <F19A8D2DA9082546A2F0360C5671939031B0B44755@iu-mssg-mbx01.ads.iu.edu>
Nair, Murlidharan T wrote:
> Does anyone have any suggestion on this? I tried par(new="T") It does not seem to work with scatterplot3d. Any suggestion is appreciated.
> Cheers../Murli
Please be patient for a day or two before expecting a reply. If you
expect some Europeans to answer: Not all of us are awake at 2am....
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Nair, Murlidharan T
> Sent: Wednesday, May 13, 2009 3:37 PM
> To: r-help at r-project.org
> Subject: [R] scatterplot3d
>
> Hi!!
>
> I am interested in plotting 3 different (x,y,z) coordinate sets on the same plot. How do I achieve using scatterplot3d?
Example:
s3d <- scatterplot3d(x, y, z, axis=FALSE,
main="DNA curvature", type="l", grid=FALSE)
s3d$points3d(x1, y1, z1, col=2, type="l")
s3d$points3d(x2, y2, z2, col=3, type="l")
> Is there an easy method to call to change the projection or rotate the figure along a particular axis? The following is the code that plots if one at a time. Any help is appreciated.
scatterplot3d is not good for such rotations. In order to view and
rotate the data, I'd suggest to use the rgl package.
Uwe Ligges
>
> Cheers../Murli
>
>
>
>
> library(lattice)
> library(scatterplot3d)
>
[data deleted to reduce message size]
>
> z<-dna.data$z[1:351]
> x<-dna.data$x[1:351]
> y<-dna.data$y[1:351]
> scatterplot3d(x, y, z, highlight.3d=TRUE, axis=FALSE, main="DNA curvature",type="l", grid=FALSE)
>
> z1<-dna.data$z[352:702]
> x1<-dna.data$x[352:702]
> y1<-dna.data$y[352:702]
> scatterplot3d(x1, y1, z1, highlight.3d=TRUE, axis=FALSE, main="DNA curvature",type="l", grid=FALSE)
>
> z2<-dna.data$z[703:1053]
> x2<-dna.data$x[703:1053]
> y2<-dna.data$y[703:1053]
> scatterplot3d(x2, y2, z2, highlight.3d=TRUE, axis=FALSE, main="DNA curvature",type="l", grid=FALSE)
mented, minimal, self-contained, reproducible code.