View source: R/labels_colors.R
color_unique_labels | R Documentation |
Color unique labels in a dendrogram
color_unique_labels(dend, ...)
dend |
a dend object |
... |
NOT USED |
A dendrogram after the colors of its labels have been updated (a different color for each unique label).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.