mengye02 发表于 2013-12-10 17:29 
貌似不行,或者是我不会设置吧,还有别的方法吗?
Well, it does require a bit more setting. You will have to change the "oma" option using the "par" function. In addition, for "mtext" you need to specify "outer = T". It should work. Here is an example:
- par(mfrow = c(2, 2), oma = c(0, 0, 3, 0))
- plot(qnorm, main = expression(Phi^{-1}))
- plot(qlogis, main = "The Inverse Logit : qlogis()")
- abline(h = 0, v = 0:2/2, lty = 3, col = "gray")
- curve(sin, -2*pi, 2*pi, xname = "t", main = "curve(sin)")
- curve(tan, xname = "t", add = NA, main = "curve(tan)")
- mtext("Plots of Different Functions", side = 3, line = 0, outer = T)
复制代码There are other ways to do multiplot on one device (e.g., layout, split.screen) but I haven't found other means of adding a title to the whole page...