?It seems that there is a problem in
?displaying subtitle in general, independently from
?multi-plot display. when I do
?plot (c(1,2,3), c(9,8,7), type = "l")
?title(main = "Main title", sub ="Sub title",cex.main=2,
?cex.sub = 2)
?subtitle doesn't get displayed
--- On Sat, 11/21/09, David Winsemius <dwinsemius at comcast.net>
wrote:
From: David Winsemius <dwinsemius at comcast.net>
Subject: Re: [R] title problem
To: "Gabor Grothendieck" <ggrothendieck at gmail.com>
Cc: "carol white" <wht_crl at yahoo.com>,
"r-help list" <r-help at r-project.org>
Date: Saturday, November 21, 2009, 10:09 AM
On Nov 21, 2009, at 12:57 PM, Gabor Grothendieck
Try the line= argument on title()
opar <- par(oma = 4 * c(1, 1, 1, 1),
par(mfrow = 1:2)
plot(1:3, 9:7)
plot(1:3, 7:9)
for(i in 1:3) title(main = i, line = i, outer =
I was not sure what Carol was hoping for. I assumed
hoping for
the full page analog of what subtitle would do with
individual
plot, i.e. that the subtitle would be below the plots
centered. If
she were hoping for just another line below the main
then your
strategy or using "\n" within the string would be
effective.
I think that she may need to use mtext() in order to
"true" sub-
title of the first sort.
--
David.
On Sat, Nov 21, 2009 at 12:47 PM, carol white
Thanks Gary. No I want one subtitle for all
title. subtitle should work but if doesn't at
could do as follows:
title(main = "Main title\nSub title",outer =
--- On Sat, 11/21/09, Gary <mail2garymiller at gmail.com>
From: Gary <mail2garymiller at gmail.com>
Subject: Re: [R] title problem
To: "David Winsemius" <dwinsemius at comcast.net>
Cc: "carol white" <wht_crl at yahoo.com>,
"r-help list" <r-help at r-project.org
Date: Saturday, November 21, 2009, 9:39
You are right David/Carol. It seems
does not work for "Sub title". I'm not
what Carol is looking for, but in case
titles for each graph, then you may want
one title statement. Like:
par(oma=c(2,2,2,2))par(mfrow =
c(1,2))plot(c(1,2,3),
c(9,8,7))title(sub ="sub title 1",
cex.sub = 0.75)plot(c(1,2,3),
c(9,8,7))title(sub ="sub title 2",
cex.sub = 0.75)
title(main = "Main title",
cex.main=1.5, outer = TRUE)
Not sure about how to do it for a single
"sub title" for whole graph.
Anyone?~Gary
On Sat, Nov 21, 2009 at 12:07 PM,
David Winsemius <dwinsemius at comcast.net>
wrote:
On Nov 21, 2009, at 11:39 AM, Gary
Hi Carol,
Try this
par(oma=c(2,2,2,2))
par(mfrow = c(1,2))
plot(c(1,2,3), c(9,8,7))
plot(c(1,2,3), c(9,8,7))
title(main = "Main title", sub ="Sub
title",outer = TRUE, cex.main=1.5,
cex.sub = 1.5)
I'm curious about what you are seeing
sequence. On a Mac running R 2.10.0 I am
subtitle.
--
David
par(oma=c(2,2,2,2)) -- can be used to
plot. Arguments
here are for "bottom", "left",
"top", "right"; which ofcourse can be
changed
according to need. HTH
~Gary
On Sat, Nov 21, 2009 at 11:21 AM, carol
wrote:
Hi,
I got problem in using title function to
multiple plots
presented together by par. As can be seen
file, the title is
displayed truncated and the subtitle
displayed. Here is the
code:
par(mfrow = c(1,2))
plot(c(1,2,3), c(9,8,7))
plot(c(1,2,3), c(9,8,7))
title(main = "Main title", sub ="Sub
title",outer = TRUE, cex.main=1.5,
cex.sub = 1.5)
Carol