[R] Centring titles for pairs of plots --- a solution.
r.turner at auckland.ac.nz
Wed Nov 10 03:13:51 CET 2010
I have figured out a *slightly* less kludgy way of accomplishing
my goal. Still a bit of a hack, but it works and seems to be
consistent across graphics devices.
Essentially it's this: After the *first* plot in each row, do:
U <- par()$usr
XD <- diff(U[1:2])
YD <- diff(U[3:4])
where "YR" is the current value of the calendar year (e.g. 2004). Note that
xpd=NA is necessary since the text is being placed outside the plotting region
and hence will not appear unless this parameter is properly set.
Hope this is of some use to someone besides my very good self. :-)
More information about the R-help