[R] Fw: Re: R Stacked Histogram

hadley wickham h.wickham at gmail.com
Wed Jan 7 19:17:27 CET 2009


Hi Jason,

> Well, one last questions about stack plot (please forgive the lame example
> below).  I thought the below allow me to resize the the "title" of the
> stacked histogram, but no luck.  Any suggestions as to the modificaiton
> necessary to get it to work?  Right now the title is obscured by the plot
> and my boss will be none too happy.  Thanks again.

Yes, that's a really stupid bug that I accidentally introduced in the
latest version.  You can fix it with:

qplot(mpg, wt, data = mtcars, main = "My title") + opts(plot.title =
theme_text(vjust = 0, size = 16))

or by adding a new line to the end of the title:

qplot(mpg, wt, data = mtcars, main = "My title\n")

Regards,

Hadley
-- 
http://had.co.nz/




More information about the R-help mailing list