# shapley galaxy cluster
X <- nnclean(shapley, k=17, plothist=TRUE)
plot(X, which.marks=1, chars=c(".", "+"), cols=1:2,
main="Shapley data, cluster and noise")
plot(X, which.marks=2, cols=function(x)hsv(0.2+0.8*(1-x),1,1),
main="Shapley data, probability of cluster")
Y <- split(X, un=TRUE)
plot(Y, chars="+", cex=0.5)
marks(X) <- marks(X)$prob
plot(cut(X, breaks=3), chars=c(".", "+", "+"), cols=1:3)
Run the code above in your browser using DataLab