Re: [R] Plotting Text on a graph

From: Earl F. Glynn <>
Date: Tue 24 Oct 2006 - 15:22:29 GMT

"Dan Chan" <dchan@GFC.STATE.GA.US> wrote in message


> I plotted 12 graphs on a page and output to a png file. I wanted to
> have an overall title for all 12 graphs. What command can I use to do
> this? Below is the code that plotted the 12 graphs in one page.

Define an "outer margin area" at the top and put your overall title there.

Find some illustrated examples of oma (outer margin area) and mar (margin area) here with mfrow/mfcol:

Perhaps this will get you started:

# Outer margin area (South, West, North, East).
# Default is all 0s, so ask for North oma of 2.
# Trim some of the space form regular margins (mar) too.

par(mfrow=c(3,4), mar=c(4,4.5,1,1), oma=c(0,0,2,0))

for (i in 1:12)

mtext("Overall Title", NORTH<-3, line=0.5, adj=0.5,

      col="red", outer=TRUE, cex=1.2)

Earl F. Glynn
Scientific Programmer
Stowers Institute for Medical Research mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed Oct 25 14:09:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 25 Oct 2006 - 04:30:15 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.