[R] scatterplot3d

Nair, Murlidharan T mnair at iusb.edu
Thu May 14 15:25:55 CEST 2009


-----Original Message-----
From: Uwe Ligges [mailto:ligges at statistik.tu-dortmund.de] 
Sent: Thursday, May 14, 2009 4:44 AM
To: Nair, Murlidharan T
Cc: r-help at r-project.org
Subject: Re: [R] scatterplot3d

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....

Sorry, for being a little impatient, I was working to meet a deadline. Thanks for your help. 


> -----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?


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.

More information about the R-help mailing list