You probably have discovered that R usually gives you different size of fonts in different figures. That is because a numerical value (cex in par function) giving the amount by which plotting text and symbols is magnified relative to a default value. This starts as ‘1’ when a device is opened, and is reset when the layout is changed, e.g. by setting ‘mfrow’.
But the final fonts size for the main title (or axis, lab, sub) is determined by the product of the three variables, ps, cex, and cex.main (or cex.axis, cex.lab, cex.sub), respectively.
So if you want 12 points fonts in the title, you may set the following options
par(ps = 12, cex = 1, cex.main = 1)
Update: it is also possible to have different fonts in axes and title, use cex.main
, cex.lab
, cex.sub
to change the magnification, respectively.
Leave a Reply