根据Cettt的建议,使用mtext
如下:
plot(mtcars, oma=c(2, 3, 5, 2))
mytitle = "I want main title NOT bold and left aligned"
mysubtitle = "Sub title should be under the main title left aligned"
mtext(side=3, line=3, at=-0.07, adj=0, cex=1, mytitle)
mtext(side=3, line=2, at=-0.07, adj=0, cex=0.7, mysubtitle)
adj=0
选项要求左对齐。
line=
选项定义每个标题的垂直位置,从绘图顶部边框向外计数。
您可以通过调整at=
选项来水平移动标题。
还请注意在plot()
调用中使用oma=
选项,以便有足够的空间将标题放置在成对的绘图上方。
help(mtext)
会有帮助。 - Cettt