[R] Main Title for multiple charts

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Jul 7 22:56:18 CEST 2005


Sundar Dorai-Raj <sundar.dorai-raj at pdf.com> writes:

> > I would like to put a title at the very top of the page that ties the 
> > theme of all the charts
> > together.  How would this be done, please?
> > 
> 
> 
> How about this:
> 
> z1 <- rexp(100)
> z2 <- rexp(100)
> z3 <- rexp(100)
> par(mfrow=c(2,2),oma = c(0, 0, 3, 0))
> curve(dexp,from=0,to=5)
> hist(z1,main="Size 5")
> hist(z2,main="Size 15")
> hist(z3,main="Size 30")
> mtext("Densities", outer = TRUE, cex = 2)

or even

title("Densities", outer = TRUE, cex.main=2)

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list