[R] Question about Title of Plot

Bill.Venables@cmis.csiro.au Bill.Venables at cmis.csiro.au
Sat Jun 1 16:56:32 CEST 2002


You need to leave some room in the outer margin and use mtext to put the
major title on the page:

par(mfrow = c(1, 2), oma = 0.1+c(0,0,4,0))
plot( ...first plot... )
title( ... first title ...)
plot( ...second plot... )
title( ...second title... )
mtext("Major title", line = 2, outer = TRUE)  ## this is the trick

Bill Venables.

-----Original Message-----
From: Bernardo Rangel Tura [mailto:tura at centroin.com.br]
Sent: Sunday, June 02, 2002 12:38 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Question about Title of Plot


Dear all,

I'm a brazilian medical doctor that I research use of likelihood in the
medical research.
I need to do a plot with this layout:

---------------------------------------
|            Major Title              | 
|                                     |
|   Title             Title           |
|  --------          --------         |
|  |       |         |       |        |
|  |       |         |       |        |
|  |       |         |       |        |
|  |       |         |       |        |
|  --------          --------         |
|                                     |
---------------------------------------

My original code was

par(mfcol = c(1, 2))
title(main="Likelihood Analysis")
plot(or,lor,type="l", ylab='Likelihood',main="Odds Ratio")
plot(tau,lor,type="l",xlab=expression(tau), ylab='Likelihood',main="log(Odds
Ratio)")

It creates this layout
---------------------------------------
|                                     | 
|                                     |
|   Title             Title           |
|  --------          --------         |
|  |       |         |       |        |
|  |       |         |       |        |
|  |       |         |       |        |
|  |       |         |       |        |
|  --------          --------         |
|                                     |
---------------------------------------

How do I do for you create the wanted Layout?
Thanks advanced for all

Bernardo Rangel Tura, M.D., MSc

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list