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

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

Reply via email to