Hi,

I am trying to compare two 3D plots. For that, I am trying to use the
"pch" parameter in the "points3d" function, but it is not working. Is
it implemented? Any suggestion?

Here goes a reproducible code. I wanted the second plot having
different symbols for the points.

x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
           matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2),
           matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2))
colnames(x) <- c("x", "y", "z")
k1<-kmeans(x,3)
k2<-kmeans(x,3,algorithm = "Lloyd")
library(rgl)
plot3d(x,col=k1$cluster)
points3d(x+.02,pch=8,col=k2$cluster)

______________________________________________
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