How to annotate across or between plots in multi-plot panels in R

前端 未结 4 577
耶瑟儿~
耶瑟儿~ 2020-12-18 00:33

If I have several plots in a single panel, I would like to be able to put text annotations that go across more than one plot area or that go in between plot areas. I\'m sure

4条回答
  •  一整个雨季
    2020-12-18 01:28

    Here is an example using Greg Snow's approach:

    par(mfrow=c(2, 2))
    replicate(4, plot(matrix(runif(20), nrow=10)))
    text(grconvertX(.5, "ndc", "user"), grconvertY(.25, "ndc", "user"), "TEST", cex=3, col="red", xpd=NA)
    text(grconvertX(.5, "ndc", "user"), grconvertY(.75, "ndc", "user"), "TEST", cex=3, col="red", xpd=NA)
    

提交回复
热议问题