Dear chip, When there is groups variable specified, scatter3d() colours the regression surface, points, and residuals for each group according to the colours specified in surface.col. (Setting surface=FALSE suppresses the regression surfaces and residuals.)
You can save the rgl graph that scatter3d() produces as a bitmapped png graphic [e.g., via Graphs -> 3D graph -> Save graph to file, which uses rgl.snapshot()]. There is also an rgl.postscript() command, which supports some vector-graphics formats, but I've been unable to use it successfully. I hope this helps, John On Tue, 4 Sep 2007 13:43:44 -0700 (PDT) array chip <[EMAIL PROTECTED]> wrote: > Hi, I am using the scatter3d function in Rcmdr to plot > the first 3 principal components, I have a grouping > variable of 2 groups, and tried to plot points with > different colors, somehow I couldn't change the > default colors of the 2 groups (blue and green)by > using option points.col=c('red','blue'), what's the > problem here? > > scatter3d(all.pca$x[,2],all.pca$x[,3],all.pca$x[,1], > surface=FALSE, residuals=TRUE, bg="white", > axis.scales=F, grid=F, ellipsoid=F, xlab='PCA > 2',ylab='PCA 3', zlab='PCA > 1',sphere.size=1.5,groups=as.factor(c(rep(1,100),rep(2,50))) > ,point.col=c('red','blue')) > > I am also wondering if I can have a copy of the image > in high resolution, just like copying a regular R plot > in "Metafile"? > > Thanks > > > > > ____________________________________________________________________________________ > > that gives answers, not web links. > > ______________________________________________ > R-help@stat.math.ethz.ch 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. -------------------------------- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ ______________________________________________ R-help@stat.math.ethz.ch 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.