[R] Fitting large titles in a plot

Greg Snow Greg.Snow at intermountainmail.org
Thu Dec 6 20:02:16 CET 2007


Try inserting \n into the title where you would like it to start on a
new line, e.g.:

plot(A,main="This is my really long title\nand it's so long\nthat I can
see just about half of it.")

You may need to give yourself more room in the margin for multi-line
titles (see ?par and the mar entry) and using the title function (rather
than in the plot) will let you specify the position of the title (line
argument).

Hope this helps,


-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Svempa
> Sent: Thursday, December 06, 2007 8:16 AM
> To: r-help at r-project.org
> Subject: [R] Fitting large titles in a plot
> 
> 
> I want to fit a fairly long main title for a plot, supposedly 
> by changing row after a while. As for now it starts way 
> outside the picture margin at the left and continues way out 
> right passed the right margins.
> 
> >plot(A,main="This is my really long title and it's so long 
> that I can 
> >see
> just about half of it.")
> 
> Any suggestions? Shouldn't be that hard.
> 
> --
> View this message in context: 
> http://www.nabble.com/Fitting-large-titles-in-a-plot-tf4956510
> .html#a14193900
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.
> 



More information about the R-help mailing list