Resizing a Dendrogram cluster label in R 3.01

Has anyone found a workaround for an obvious bug in R 3 that prohibits resizing labels on a cluster dendrogram?

The following code used to work correctly before updating R to 3.01 (the previous version was 2.15, I think):

plot(hclust, labels = data[, 1], cex = 0.3) 

Now, when changing the cex argument, cex no change in label size.

+8
r label size hclust
source share
1 answer

You can set the cex parameter with the par() function before calling plot() . For example:

 # example from ?hclust hc <- hclust(dist(USArrests), "ave") # default label size plot(hc, xlab="xlab", ylab="ylab", main="main", sub="") # reduced label size par(cex=0.3, mar=c(5, 8, 4, 1)) plot(hc, xlab="", ylab="", main="", sub="", axes=FALSE) par(cex=1) title(xlab="xlab", ylab="ylab", main="main") axis(2) 
+27
source share

All Articles