Here is the code:
require(ggplot2)
require(grid)
# pdf(\"a.pdf\")
png(\'a.png\')
a <- qplot(date, unemploy, data = economics, geom = \"line\") + opts(title=\'
What you are looking for is theme(plot.title = element_text(hjust = 0))
. For example, using the latest version of ggplot2 and theme
instead of opts
we have
a <- qplot(date, unemploy, data = economics, geom = "line") + ggtitle("A") +
theme(plot.title = element_text(hjust = 0))
Alternatively, staying with opts
a <- qplot(date, unemploy, data = economics, geom = "line") +
opts(title = "A", plot.title = element_text(hjust = 0))