FUNCTION REFERENCE

dendrogram

Draw a hierarchical linkage tree as U-shaped lines.

Draw a hierarchical linkage tree as U-shaped lines.

Syntax

H = dendrogram(Z)

Syntax

[H, T, outperm] = dendrogram(Z, P)

Z is the three-column linkage matrix. Each displayed merge creates one line object whose height is the linkage distance. Leaves follow left-to-right child order; ticks show their labels. The default P=30 contracts the earliest merges until at most 30 leaves remain. P=0 shows every leaf. T is a column assigning each original observation its displayed leaf label; outperm is a row of those labels in plotted order. Contracted leaves are numbered by their earliest original observation.

Example

Z = linkage([0;1;4;6], 'average'); [H,T,outperm] = dendrogram(Z,0);

Differences from MATLAB: vertical layout only; axes arguments, colors, labels, reordering and other name/value options are unsupported. Existing plot bounds permit at most 65 visible leaves (64 merge lines); choose P accordingly. Custom leaf ticks are transient, as are other axes decorations.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.