How can I add labels to a ggdendro plot? I realise from reading ?dendro_data that I am suppose to use the the call 'labels' but can't find an example of actual implementation. Could anybody please demonstrate how to add leaf labels to the example below. Thank you
require(ggplot2)
hc <- hclust(dist(USArrests), "ave")
dhc <- as.dendrogram(hc,hang=0.1)
ddata <- dendro_data(dhc, type="rectangle")
ggplot(segment(ddata)) + geom_segment(aes(x=x, y=y, xend=xend, yend=yend))