Re: [R] Title of page with multiple plots

From: Earl F. Glynn <efg_at_stowers-institute.org>
Date: Sat 13 May 2006 - 03:40:32 EST

"John Sorkin" <jsorkin@grecc.umaryland.edu> wrote in message news:s4639800.096@MEDICINE.umaryland.edu...
> I want to place four plots on a page, and I would like to have all four
> plots share a common title. I have tried the following code, but the
> title is centered over the fourth graph and not centered across all four
> plots. Does anyone have any suggestions?

You may want to adjust the "North" parameters for the outer margin area (oma) and the regular margin (mar):

# oma and mar: c(South,West,North,East)
oldpar <- par(mfcol =c(1,4), oma=c(0,0,2,0), mar=c(5.1,4.1,0,2.1))

plot(1)
plot(2)
plot(3)
plot(4)

title("Common title", outer=TRUE)

par(oldpar)

efg
Earl F. Glynn
Scientific Programmer
Bioinformatics
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 Received on Sat May 13 03:53:20 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 Sat 13 May 2006 - 04:10:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.