Skip to content
Prev 241014 / 398500 Next

Centring titles for pairs of plots --- a solution.

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])
        text(U[1]+1.05*XD,U[3]+1.15*YD,labels=YR,adj=0,font=2,cex=1.5,xpd=NA)

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. :-)

	cheers,

		Rolf Turner