Dear René, I've confirmed that the spheres aren't coloured correctly on my Ubuntu system (the first colour is used for all of the spheres), and I know that this works right on Windows, as you mentioned. I'm curious to try it on my Mac, but don't have that handy at the moment.
I also looked at the code for scatter3d.default(), and that is pretty straightforward; scatterplot3d.default() draws the spheres with the command rgl.spheres(x, y, z, color = surface.col[as.numeric(groups)], radius = size) I'm copying this response to Duncan Murdoch (the coauthor and maintainer of the rgl package) in case he has any insight into the problem. Thank you for drawing this issue to my attention. John ------------------------------------------------ John Fox Sen. William McMaster Prof. of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ On Thu, 12 Apr 2012 19:14:21 +0200 "René Mayer" <ma...@psychologie.tu-dresden.de> wrote: > 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@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. ______________________________________________ R-help@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.