bpCent3d: Three Dimensional Biplot of a Clustering Solution

Description Usage Arguments Details Side Effects See Also

View source: R/BCA.R

Description

Plot a biplot of a clustering solution on the current graphics device.

Usage

1
2
3
4
5
bpCent3d(pc, clsAsgn, data.pts = TRUE, centroids = TRUE, 
  choices = 1:3, scale = 1, pc.biplot = FALSE, var.axes = TRUE, 
  col.score = "black", col.cntrs = "blue", col.load = "red",
  xlabs = NULL, ylabs = NULL, xlim = NULL, ylim = NULL, zlim = NULL,
  xlab = NULL, ylab = NULL, dim.lab = NULL, fov = 60)

Arguments

pc

The prcomp object of the data used in clustering.

clsAsgn

A vector containing the cluster assignment for each record in the clustering data.

data.pts

If TRUE the point for each record is plotted.

centroids

If TRUE the centroid for each cluster is plotted.

choices

length 2 vector specifying the components to plot.

scale

The variables scaled by lambda ^ scale and the observations are scaled by lambda ^ (1-scale), where lambda are the eigen values of the principal components solution. scale should be between 0 and 1.

pc.biplot

If TRUE, then lambda = 1 and the observations are scaled up the sqrt(n) and the variables scaled down by sqrt(n). In this case the inner product between variables approximate covariances, and the distances between observations approximate Mahalanobis distance. Gabriel refers to this as a "principal component biplot".

var.axes

If TRUE the second set of points have arrows representing them as (unscaled) axes.

col.score, col.cntrs, col.load

A vector of length 2 giving the colours for the first and second set of points respectively (and the corresponding axes). If a single colour is specified it will be used for both sets. If missing the default colour is looked for in the palette: if there it and the next colour as used, otherwise the first two colours of the paletter are used.

xlabs

A vector of character strings to label the first set of points: the default is to use the row dimname of x, or 1:n is the dimname is NULL.

ylabs

A vector of character strings to label the second set of points: the default is to use the row dimname of y, or 1:n is the dimname is NULL.

xlim, ylim, zlim

Limits for the x, y, z axes in the units of the first set of variables.

xlab, ylab, dim.lab, fov

Graphical parameters for rgl.

Details

This function is a reworking of biplot in order to allow the cluster centroids of a clustering solution to be displayed as well as the individual data points, and extend it to three dimensions. The use of arrow heads is discouraged since their creation is very resource intensive. If both data.pts and centroids are set to FALSE then only the variable directional vectors are displayed.

Side Effects

A plot is produced on the current graphics device.

See Also

biplot


BCA documentation built on May 2, 2019, 1:26 p.m.

Related to bpCent3d in BCA...