rdendrogram

Change label size in plot.dendrogram


I would like to reduce the size of the words that make up my dendrogram.

My code so far, but it doesn't reduce the size of the words:

           hc_sbd_1 <- tsclust(result3_2, type = "h", k= 10,
              distance = "sbd", 
              control = hierarchical_control(method = "ward.D"))


            hc_sbd_1  <- as.dendrogram(hc_sbd_1, cex = 0.2)
            plot(hc_sbd_1)

This is my dendrogram

enter image description here


Solution

  • You can also use the dendextend R package to get a very refined control of the output.

    E.g. you can change the hclust to dendrogram using as.dendrogram, and then use the set function (from dendextend) with the "labels_cex" to change the sizes of the labels.