R: Titles cut in half with par()

前端 未结 1 1602
面向向阳花
面向向阳花 2021-01-18 03:10

I have this figure:

require(corrplot)
par(oma=c(0,0,2,0), mfrow = c(1, 3))
for (country in c(\"Italy\",\"Germany\",\"Afghanistan\")) {
  corrplot.mixed(cor(d         


        
相关标签:
1条回答
  • 2021-01-18 03:39

    I found that passing mar arguments to corrplot was effective:

        png(height=300,width=600);par(oma=c(0,0,2,0), mfrow = c(1, 3))
    for (country in c("Italy","Germany","Afghanistan")) {
      corrplot.mixed(cor(data.frame(v1=rnorm(40),
                                    v2=rnorm(40),
                                    v3=rnorm(40),
                                    v4=rnorm(40),
                                    v5=rnorm(40),
                                    v6=rnorm(40),
                                    v7=rnorm(40),
                                    v8=rnorm(40)), use="pairwise.complete.obs"),
                     main=country, mar=c(0,0,2,0))
    };dev.off()
    

    enter image description here

    0 讨论(0)
提交回复
热议问题