ggdendroggdplot(hc, lab = NULL, ptype = 1, title = NULL, ...)dendro_data function, i.e. objects of class dendrogram, hclust or treeptype==1, the plot is
rotated by 90 degrees, the theme is blank, and the title is plotted. If ptype!=1, the
plot is rotated by 90 degrees, and the background is a grayscale grid.ptype!=1.geom_textggplot objectptype==1, the function
executes the equivalent ofggdendrogram(hcdata, rotate=TRUE, size=2) + labs(title="Dendrogram in ggplot2")
If ptype!=1, the function executes the equivalent of
ggdendrogram(hcdata, rotate = TRUE, theme_dendro = FALSE)
Objects that are not of class dendro are coerced to class dendro prior to plotting.
library(ggplot2)
hc <- hclust(dist(USArrests), "ave")
p<-ggdplot(hc, ptype=2)
Run the code above in your browser using DataLab