Hello

I've created a 3d scatterplot, and had no problems labeling the points.
However, I've been really struggling to change the color of the points based
on a factor (see 'group' below).  Is such a thing possible?

My data look like this:

food group      x      y      z
apple  fruit  0.216 -0.112 -0.893
orange fruit  0.814  0.097  0.460
broccoli veg -0.239  0.240 -0.425
banana  fruit  0.222  0.968 -0.050
parsnip  veg  0.139  0.897  0.378
garlic     veg -0.104  0.510 -0.400

pca <-  read.table(...
p3d<- plot3d(pca$x, pca$y, pca$z, xlab="Component 1", ylab="Component 2",
zlab="Component 3", col="blue",box=FALSE, size=5)
food.v<-as.vector(pca$food)
text3d(pca$x, pca$y, pca$z, food.v, cex=0.9, adj = 1)

Many thanks,
Leigh

	[[alternative HTML version deleted]]

