data(votes.repub)
agn <- agnes(votes.repub)
pltree(agn)
dagn <- as.dendrogram(as.hclust(agn))
dagn2 <- as.dendrogram(as.hclust(agn), hang = 0.2)
op <- par(mar = par("mar") + c(0,0,0, 2)) # more space to the right
plot(dagn2, horiz = TRUE)
plot(dagn, horiz = TRUE, center = TRUE,
nodePar = list(lab.cex = 0.6, lab.col = "forest green", pch = NA),
main = deparse(agn$call))
par(op)
Run the code above in your browser using DataLab