[R] scatter3d with groups
David Winsemius
dwinsemius at comcast.net
Wed Dec 2 22:37:24 CET 2009
On Dec 2, 2009, at 4:09 PM, Philippe Thomas wrote:
> Dear R users,
>
> I'm currently visualizing my data using scatter3d from the "Rcmdr"
> package. I have data points which can be separated in two classes.
> Data points from class 'A' should be colourised red and data points
> in class 'B' should be colourised 'blue'. No matter what I try, the
> data points are always blue.
>
> I attached a (very) minimal example to reproduce my problem.
>
> Thanks,
> Philippe
>
> library("Rcmdr")
>
> scatter3d(x=c(1,2), y=c(1,2), z=c(1,2),
> groups=as.factor(c(1,2)),
> point.col=c('red','blue'), surface=F)
Now that is weird! (I'm not a regular user of Rcmdr.) I didn't think
that rgl would run under the 64 bit R, but there does seem to be a
functioning rgl widow that comes up. Hmmm .... Need to investigate
this further. Looks promising.
Dropping the groups term corrects your color problem, so the colors
are probably <somehow> being derived from the numerical underpinnings
of the group factor.
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list