I have a 2x2 plot set up using: par(mfrow=c(2,2)) I'd like to put an overall title on the page, but I cannot figure out how. Any ideas? [[alternative HTML version deleted]]
Please try this:> z1 <- rexp(100) > z2 <- rexp(100) > z3 <- rexp(100) > z4 <- rexp(100) > par(mfrow=c(2,2),oma = c(0, 0, 3, 0)) > curve(dexp,from=0,to=5) > hist(z1,main="first") > hist(z2,main="second") > hist(z3,main="third") > mtext("Densities", outer = TRUE, cex = 1.5) >Hope this helps. Sincerely, Erin On Thu, Jun 12, 2008 at 10:38 AM, <Trevor.A.Craney at shell.com> wrote:> I have a 2x2 plot set up using: par(mfrow=c(2,2)) > I'd like to put an overall title on the page, but I cannot figure out how. Any ideas? > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >-- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
See mtext: mtext("Title", outer = T, side = 3, line = -2) On Thu, Jun 12, 2008 at 12:38 PM, <Trevor.A.Craney@shell.com> wrote:> I have a 2x2 plot set up using: par(mfrow=c(2,2)) > I'd like to put an overall title on the page, but I cannot figure out how. > Any ideas? > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
?title, see 'outer' (and you will need to make room for an outer margin). This is described in 'An Introduction to R' (and in all good books on R). On Thu, 12 Jun 2008, Trevor.A.Craney at shell.com wrote:> I have a 2x2 plot set up using: par(mfrow=c(2,2)) > I'd like to put an overall title on the page, but I cannot figure out > how. Any ideas?-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Check out this previous post from years ago. http://tolstoy.newcastle.edu.au/R/help/00a/2237.html Bill> Date: Thu, 12 Jun 2008 10:38:03 -0500> From: Trevor.A.Craney@shell.com> To: r-help@r-project.org> Subject: [R] overall title> > I have a 2x2 plot set up using: par(mfrow=c(2,2))> I'd like to put an overall title on the page, but I cannot figure out how. Any ideas?> > > [[alternative HTML version deleted]]> > ______________________________________________> R-help@r-project.org 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. _________________________________________________________________ Instantly invite friends from Facebook and other social networks to join yo https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends [[alternative HTML version deleted]]