In this diagram, the main information (most nodes) is on the extreme left side.
I want to make the dendrogram easy to read and thus the edges should be proportionally long. Any specific arguments to be used or is it just the data's problem?
In this diagram, the main information (most nodes) is on the extreme left side.
I want to make the dendrogram easy to read and thus the edges should be proportionally long. Any specific arguments to be used or is it just the data's problem?
Package ape
has an option for plotting a tree (or dendrogram) without edge lengths.
library(ape)
# calculate dendrogram from sample data
data(carnivora)
tr <- hclust(dist(carnivora[1:20,6:15]))
# convert dendrogram from class 'hclust' to 'phylo'
tr <- as.phylo(tr)
# plot, use par(mfrow=c(1,3)) to display side by side
plot(tr)
plot(tr, use.edge.length = FALSE)
plot(tr, use.edge.length = FALSE, node.depth = 2)
This calls the plot.phylo function and enables you to manipulate how the dendrogram looks like. To improve legibility of labels, you might need to tinker settings within plot
that influence font size (cex = 0.7
) or offset of the label (label.offset = 0.5
).