Hi, I got problem in using title function to create a title for multiple plots presented together by par. As can be seen in the attached file, the title is displayed truncated and the subtitle doesn't get 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: titlePb.png Type: image/png Size: 28006 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091121/a52046b6/attachment-0002.png>
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) par(oma=c(2,2,2,2)) -- can be used to define outline of the plot. Arguments here are for "bottom", "left", "top", "right"; which ofcourse can be changed according to need. HTH Gurmeet On Sat, Nov 21, 2009 at 11:21 AM, carol white <wht_crl@yahoo.com> wrote:> Hi, > I got problem in using title function to create a title for multiple plots > presented together by par. As can be seen in the attached file, the title is > displayed truncated and the subtitle doesn't get 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 > > > > ______________________________________________ > 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. > >[[alternative HTML version deleted]]
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) par(oma=c(2,2,2,2)) -- can be used to define outline of the 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 white <wht_crl@yahoo.com> wrote:> Hi, > I got problem in using title function to create a title for multiple plots > presented together by par. As can be seen in the attached file, the title is > displayed truncated and the subtitle doesn't get 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 > > > > ______________________________________________ > 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. > >[[alternative HTML version deleted]]
On Nov 21, 2009, at 11:39 AM, Gary wrote:> 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 with that sequence. On a Mac running R 2.10.0 I am not seeing the subtitle. -- David> > par(oma=c(2,2,2,2)) -- can be used to define outline of the 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 white <wht_crl at yahoo.com> > wrote: > >> Hi, >> I got problem in using title function to create a title for >> multiple plots >> presented together by par. As can be seen in the attached file, the >> title is >> displayed truncated and the subtitle doesn't get 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 >> >> >> >> ______________________________________________ >> 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. >> >> > > [[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.David Winsemius, MD Heritage Laboratories West Hartford, CT
subtitle still doesn't get displayed --- On Sat, 11/21/09, Gurmeet <gurmeet at email.unc.edu> wrote:> From: Gurmeet <gurmeet at email.unc.edu> > Subject: Re: [R] title problem > To: "carol white" <wht_crl at yahoo.com> > Cc: r-help at r-project.org > Date: Saturday, November 21, 2009, 8:30 AM > 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) > par(oma=c(2,2,2,2)) -- can be used to define outline > of the plot. Arguments here are for "bottom", > "left", "top", "right"; which > ofcourse can be changed according to need. HTH > > Gurmeet > > On Sat, Nov 21, 2009 at 11:21 AM, > carol white <wht_crl at yahoo.com> > wrote: > > Hi, > > I got problem in using title function to create a title for > multiple plots presented together by par. As can be seen in > the attached file, the title is displayed truncated and the > subtitle doesn't get 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 > > > > > > ? ? ? > ______________________________________________ > > 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. > > > > >