Question

I have this simple code to draw a dendrogram but the feature ylim seems not to work. So no matter what I set it to it has a y range of [0,0.5] when drawn.

Should I use another parameter for setting the ylim when drawing dendrograms?

plot(hclust(total_dist),main=NULL,ylab=NULL,ylim=c(0,1))

enter image description here

Was it helpful?

Solution

You could use as.dendrogram:

hc <- hclust(dist(USArrests)/200, "ave")
plot(hc)
plot(hc, ylim = c(0,1))  # negative case
plot(as.dendrogram(hc))
plot(as.dendrogram(hc), ylim = c(0,1))  # positive case
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top