dendextend (version 1.17.1)

color_unique_labels: Color unique labels in a dendrogram

Description

Color unique labels in a dendrogram

Usage

color_unique_labels(dend, ...)

Value

A dendrogram after the colors of its labels have been updated (a different color for each unique label).

Arguments

dend

a dend object

...

NOT USED

Examples

Run this code

x <- c(2011, 2011, 2012, 2012, 2015, 2015, 2015)
names(x) <- x
dend <- as.dendrogram(hclust(dist(x)))

par(mfrow = c(1, 2))
plot(dend)
dend2 <- color_unique_labels(dend)
plot(dend2)

Run the code above in your browser using DataLab