R - change size of axis labels for corrplot

前端 未结 3 1319
粉色の甜心
粉色の甜心 2021-02-05 22:24

I am using the following with corrplot:

require(\"corrplot\") ## needs the corrplot package
corrplot(cor(lpp_axis1, lpp_axis2), method=c(\"number\")         


        
3条回答
  •  别那么骄傲
    2021-02-05 22:40

    Given the examples you added, you might have to increase the dimensions of the plot and set the outer margins to accommodate the length of your labels.

    The current plot dimension can be accessed with par()$pin and the outer margins with par()$omi .

    You can change the plot dimension and the outer margins by adapting the following example:

    require("corrplot")         ## needs the corrplot package  
    data(mtcars)  
      corr <- cor(mtcars)    
    par(pin=c(7,7))              ##  (width, height) in inches    
    par(omi=c(0,1,1,0.5))        ## (bottom, left, top, right)  in inches  
    corrplot(corr, method="number", tl.cex = 2)
    

    enter image description here


提交回复
热议问题