"Dan Chan" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> 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:
http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm


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)
{
  plot(0)
}

mtext("Overall Title", NORTH<-3, line=0.5, adj=0.5,
      col="red", outer=TRUE, cex=1.2)


efg
Earl F. Glynn
Scientific Programmer
Stowers Institute for Medical Research

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to