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?
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.
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" <mayer at 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 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.