mtext: smaller labels description when layout is used

China☆狼群 提交于 2019-12-07 02:51:26

When layout is used, the meaning of cex=1 in plot is different, but I would not have expected that difference to extend to mtext since its activities are outside the individual plotting regions. You can reverse the default reduction in "effective"-cex inside plot by inverting the expected factor of 2/3:

layout(matrix(c(1,1,2,2), ncol=1))
op<-par(mar=c(4,4,2,1))
plot(1:10, xlab="", ylab="", main="This is my title")
mtext("this is the x-axis", side=1, line=2.75, cex=1)
mtext("this is the y-axis", side=2, line=2.5, cex=1)
plot(1:10,  xlab="this is _not_ smaller", 
            ylab="this is _not_ smaller, either", 
            main="This is my title", 
            cex.lab=3/2)
par(op)

Further reading:

 ?par  # scroll down to mfcol, mfrow
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!