[R] scatter3d: problem with spheres-color

Steve_Friedman at nps.gov Steve_Friedman at nps.gov
Thu Apr 12 19:31:12 CEST 2012


I do something similar my script is structured as follows: perhaps it will
help

library(car)
library(rgl)
library(mgcv)

scatter3d(MADep2009 ~ MADwet2009 + MedAD2009 | as.factor(VegClass), data =
SFCN,
sphere.size=1.5, surface=FALSE, parallel=FALSE, elliposiod=TRUE,
surface.col=c("green", "red", "blue", "gold", "firebrick3")

hope this offers some assistance.

Steve

Steve Friedman Ph. D.
Ecologist  / Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034

Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax     (305) 224 - 4147


                                                                           
             "René Mayer"                                                  
             <mayer at psychologi                                             
             e.tu-dresden.de>                                           To 
             Sent by:                  r-help at r-project.org                
             r-help-bounces at r-                                          cc 
             project.org                                                   
                                                                   Subject 
                                       [R] scatter3d: problem with         
             04/12/2012 01:14          spheres-color                       
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Dear List,
I don't get scatter3d to color the sheres according to the '|' argument.

library(car)
scatter3d(prestige ~ income + education|type, data=Prestige)

The spheres on my screen are all colored the same and they are not
conditional on Prestige$type.
On the other hand: Fit3d and Ellipse3d are colored according to the
group argument.

rgl_0.92.879
car_2.0-12
R version 2.15.0
i686-pc-linux-gnu (32-bit)

I checked this under windows and: here they are colored according to
'Prestige$type'.
Hmm? What goes wrong here, any ideas?

thanks,
René

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



More information about the R-help mailing list