View source: R/graphics_plot_dendrogram.R
| plot_dendrogram | R Documentation |
Dendrogram plot for an hclust or dendrogram object using ggplot2.
plot_dendrogram(hc, labels = TRUE, label_size = 3, title = NULL)
hc |
an object of class |
labels |
logical; whether to draw leaf labels |
label_size |
label text size |
title |
optional plot title |
Converts a dendrogram into line segments and renders it with ggplot2.
returns a ggplot2::ggplot graphic
data(iris)
hc <- hclust(dist(scale(iris[,1:4])), method = "ward.D2")
grf <- plot_dendrogram(hc)
plot(grf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.