powered by
Produce a scatter plot for clustering results. If the dataset has more than two dimensions, the scatter plot will show the two first PCA axes.
scatterplot( d, clusters, centers = NULL, labels = FALSE, ellipses = FALSE, legend = c("auto1", "auto2"), ... )
The dataset (matrix or data.frame).
matrix
data.frame
Cluster labels of the training set (vector or factor).
vector
factor
Coordinates of the cluster centers.
Indicates whether or not labels (row names) should be showned on the plot.
Indicates whether or not ellipses should be drawned around clusters.
Indicates where the legend is placed on the graphics.
Other parameters.
require (datasets) data (iris) km = KMEANS (iris [, -5], k = 3) scatterplot (iris [, -5], km$cluster)
Run the code above in your browser using DataLab