Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scatterplot

Clustering Scatter Plots


Description

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.

Usage

scatterplot(
  d,
  clusters,
  centers = NULL,
  labels = FALSE,
  ellipses = FALSE,
  legend = c("auto1", "auto2"),
  ...
)

Arguments

d

The dataset (matrix or data.frame).

clusters

Cluster labels of the training set (vector or factor).

centers

Coordinates of the cluster centers.

labels

Indicates whether or not labels (row names) should be showned on the plot.

ellipses

Indicates whether or not ellipses should be drawned around clusters.

legend

Indicates where the legend is placed on the graphics.

...

Other parameters.

Examples

require (datasets)
data (iris)
km = KMEANS (iris [, -5], k = 3)
scatterplot (iris [, -5], km$cluster)

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.