Skip to content
Prev 66777 / 398506 Next

2d plotting and colours

Thank you very much.

the code
plot(x, col = s)
points(cl$centers, col = s, pch = 8, cex=2)

does not plot the points according to the group colors. The plots are used 
to identify the groups by colors

That could be done by

plot(x, col = cl$cluster)

This means that we need to set the default colours , say col = cl$cluster = 
a set of group numbers say 1...10 should produce 10 distinct colours points 
grouped by colour.

how to do this when you have more than 8 group colours to plot