dendrogram
Dendrogram plot
Syntax
Description
dendrogram(
generates a dendrogram plot of the
hierarchical binary cluster tree. A dendrogram consists of many
U-shaped lines that connect data points in a hierarchical
tree. The height of each U represents the distance between
the two data points being connected.tree
)
If there are 30 or fewer data points in the original data set, then each leaf in the dendrogram corresponds to one data point.
If there are more than 30 data points, then
dendrogram
collapses lower branches so that there are 30 leaf nodes. As a result, some leaves in the plot correspond to more than one data point.
dendrogram(___,
specifies additional options using one or more name-value arguments. For
examples, you can specify the order of leaf nodes and the orientation of the
dendrogram plot.Name=Value
)
dendrogram(
displays the plot in the target axes. Specify ax
,___)ax
as the
first input argument followed by any of the input argument combinations in the
previous syntaxes.
returns a vector of
H
= dendrogram(___)Line
objects. You can use any of the argument
combinations from the previous syntaxes.
[
also returns a vector H
,T
,outperm
]
= dendrogram(___)T
containing the
leaf node number for each object in the original data set, and a vector
outperm
giving the order of the node labels of the
leaves as shown in the dendrogram.
It is useful to return
T
when the number of leaf nodes,P
, is less than the total number of data points, where some leaf nodes in the display correspond to multiple data points.The order of the node labels given in
outperm
is from left to right for a vertical dendrogram, and from bottom to top for a horizontal dendrogram.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006aSee Also
cluster
| clusterdata
| cophenet
| inconsistent
| linkage
| optimalleaforder
| pdist
| silhouette