draw.dendrogram3d {NeatMap}R Documentation

Draws a dendrogram in 3d

Description

Draw a dendrogram in 3d given clustering results and leaf positions. Labels at leaf tips may be specified

Usage

draw.dendrogram3d(cluster, positions, direction = c(0, 0, -1), scale = NULL,
heights = NULL, labels = NULL, label.colors = NULL, label.size = 3)

Arguments

cluster Hierarchical clustering result of type hclust to be plotted.
positions Positions (in 3d) of leaf tips. If 2d positions are given, these are placed in the z=0 plane.
direction A vector specifying the direction in which the leaves point
scale Maximum hieght of dendrogram
heights A vector of heights, which may be used to over-ride the height information included in cluster (which are used by default if this is NULL)
labels Vector of text labels to be placed at leaf tips.
label.colors Vector of colors used used for labels.
label.size Text size for labels.

Details

May be used to validate 2D embedding results with those of cluster analysis. When cluster results and the corresponding 2D embedding are specified, this function places the positions in a rotatable environment with the cluster analysis result superposed on it. This allows the user to understand the relationship between the clustering and embedded results. Labels (or desired colors) may be placed at the leaf tips.

Value

This function is called for the side effect it produces. It returns the id number of the last object drawn.

Author(s)

Satwik Rajaram and Yoshi Oono

See Also

draw.dendrogram

Examples

mtcars.nMDS<-nMDS(mtcars,metric="euclidean")
mtcars.cluster<-hclust(dist(mtcars),method="complete")
draw.dendrogram3d(mtcars.cluster,mtcars.nMDS$x,labels=rownames(mtcars),label.size=0.5)

[Package NeatMap version 0.3.2 Index]