[R] Centring titles for pairs of plots.

Rolf Turner r.turner at auckland.ac.nz
Wed Nov 10 01:31:35 CET 2010


I would like to centre titles for pairs of plots in a 3-x-2
array.  Each row of the array corresponds to a calendar year
and I would like to have the year value centred between the
two plots in the row, and just above their upper edges.

I have attached an example in "demo.pdf" showing roughly
what I want.  I managed to produce the example using

mtext(outer=TRUE,side=3,line=<whatever>,text=YR,font=2)

I got the appropriate (negative) values for "line" by trial-and-error
experimentation. That's pretty kludgy, and the result only works for
the screen graphics device with which I experimented.  If I switch to pdf()
everything is out of whack.  I produced demo.pdf by plotting to the screen
graphics device and then using dev.copy().

Is there a non-kludgy way of accomplishing my objective?

Thanks.

	cheers,

		Rolf Turner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo.pdf
Type: application/pdf
Size: 13253 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101110/60dd7b4a/attachment.pdf>


More information about the R-help mailing list