I would like to create a dendrogram plot with horizontal labels, but having the leaves hang according to their height, instead of just drop to the edge of the plot.
Example:
par(mfrow = c(1,2))
hc <- hclust(dist(USArrests), "ave")
plot(hc) # a plot with hanging branches
plot(as.dendrogram(hc), horiz = TRUE) # a horizontal plot, but the branches are not hanging
Any suggestion on how this can be programmed?
Thanks.
?dendrogram
. – Ferdinand.kraftedgetext
attribute, to be set for every edge usingdendrapply
. It's just an idea, I don't have the time now to pursue this. :-( – Ferdinand.kraftlattice
andggplot2
. – nograpes