ylim in hclust plot

dendrogram, plot, r

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

Problem

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)) ```

Original source