Re: [R] Title for graph with multiple plots

From: Ted Harding <Ted.Harding_at_manchester.ac.uk>
Date: Sat, 19 Jul 2008 18:29:04 +0100 (BST)


On 19-Jul-08 10:29:43, Tolga Uzuner wrote:
> Dear R Users,
> I am attempting to place a title to a graph with multiple plots that
> should go across the top of all the graphs, and not just one of them. I
> am using mfrow in par to plot. Can anyone suggest if and how this could
> be done ?
> Thanks in advance,
> Tolga

The following post from Erin Hodgess gives an example of how to do it:

Date: Thu, 12 Jun 2008 11:17:28 -0500
Sender: r-help-bounces_at_r-project.org
From: Erin Hodgess <erinm.hodgess_at_gmail.com> To: Trevor.A.Craney_at_shell.com
Subject: Re: [R] overall title
Cc: r-help_at_r-project.org

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?

Best wishes,
Ted.



E-Mail: (Ted Harding) <Ted.Harding_at_manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861
Date: 19-Jul-08                                       Time: 18:29:01
------------------------------ XFMail ------------------------------

______________________________________________
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. Received on Sat 19 Jul 2008 - 17:31:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jul 2008 - 18:31:56 GMT.

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

list of date sections of archive