R: ggplot2, can I set the plot title to wrap around and shrink the text to fit the plot?
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-13T17:35:54Z
Indexed on
2010/04/13
23:03 UTC
Read the original article
Hit count: 329
library(ggplot2)
my_title = "This is a really long title of a plot that I want to nicely wrap \n and fit onto the plot without having to manually add the backslash n, but at the moment it does not"
r <- ggplot(data = cars, aes(x = speed, y = dist))
r + geom_smooth() + #(left)
opts(title = my_title)
can I set the plot title to wrap around and shrink the text to fit the plot?
© Stack Overflow or respective owner