R语言画图大坑之分图总标题
作者:互联网
很多时候画小图却没有大标题,这个mtext()命令可以补上。注意par()命令中的oma参数非常重要。
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)
具体效果如下
标签:plot,par,main,之分,大坑,curve,画图,tan,pi 来源: https://www.cnblogs.com/Zeooo/p/12450950.html