Label a Cluster Plot

DESCRIPTION:
Places labels on a hierarchical clustering plot.

USAGE:
labclust(x, y, labels = <<see below>>)

REQUIRED ARGUMENTS:
x,y:
coordinates of points. The coordinates can be given by two arguments that are vectors or by a single argument x which is a univariate time series, a complex vector, a matrix with 2 columns, or a list containing components named x and y. Typically, these are the coordinates of the leaves of the tree, as produced by plclust. Missing values (NAs) are allowed.

OPTIONAL ARGUMENTS:
labels:
control of labels on the cluster leaves. By default, leaves are labeled with the object number. If labels is a character vector, it is used to label the leaves. Otherwise it is interpreted as a logical flag (in particular, the value FALSE suppresses any labeling of leaves, as is appropriate with large trees).

Missing values are not accepted.

Graphical parameters may also be supplied as arguments to this function (see par). In addition, the high-level graphics arguments described under par and the arguments to title may be supplied to this function.


SIDE EFFECTS:
labels are added to the current plot, which should be a cluster plot.

DETAILS:
The horizontal distance between leaves is 1, and the left-most leaf has "x" coordinate 1, the fifth from the left has coordinate 5, etc.

SEE ALSO:
dist , hclust , par , plclust , text .

EXAMPLES:
# create a sample object using built-in dataset
x <- hclust(dist(longley.y))
xy <- plclust(x, plot = FALSE)  # save coords of tree
plclust(x, label = FALSE)  # plot it
labclust(xy)  # now label it with the object number

# can use a character vector of names to label the leaves labclust(xy, labels=listnames) # vector is called "listnames"