Search code examples
rplotdendrogram

r increase the font size of values in dendogram plot


How can I can increase the font size of labels , x2, x1, x3, x4 in the plot produced based on the function varclus

set.seed(1)
x1 <- rnorm(200)
x2 <- rnorm(200)
x3 <- x1 + x2 + rnorm(200)
x4 <- x2 + rnorm(200)
x <- cbind(x1,x2,x3,x4)
v <- varclus(x, similarity="spear")  # spearman is the default anyway
v    # invokes print.varclus
print(round(v$sim,2))
plot(v)

Thanks.


Solution

  • plot.varclus internally calls plot.hclus as you can see by running:

    getS3method("plot",class = 'varclus')
    

    and it passes along the labels argument (and the ... argument(s)). this includes a font scaling argument cex

    so try:

    plot(v, 
         cex = 1.5)