[R] Adding text to a multiplot (via mfrow)

Peter Ehlers ehlers at ucalgary.ca
Tue Nov 30 19:39:43 CET 2010

On 2010-11-30 09:40, smj_115 wrote:
> Hi
> I have created a set of 4 barplots using mfrow=c(2,2) and need to
> add a heading that spans the margin of the bottom 2 graphs.
> I have used locator(1) to find the coordinates but I dont seem to be able to
> add text anywhere on this multiplot.
> I would be really grateful if anyone could tell me if there is a simple
> method of achieving this.

You probably want to look at ?mtext and especially its
arguments 'outer', 'side', 'adj' and 'line'.
But make sure that there's enough space in the margin with
par(oma = c(....)).

Peter Ehlers

> Many thanks
> Sam Jones

More information about the R-help mailing list