I would like to add a default caption to all my charts so that I do not have to type it in for all the charts I make. Is there a way to add default text labels to a theme?
Here's what I'd like to do. I'm using my own theme (theme_bw
in this example). I would like to avoid typing the caption every time I make a chart. Is there a way to add + labs(caption ="Default")
inside theme_bw()
?
Or can I create a new object with both + labs(caption ="Default")
and + theme_bw()
that could be called as + labs_and_theme
ggplot(diamonds[1:20,], aes(x=carat, y=price)) +
geom_point() +
labs(caption ="Default") +
theme_bw()
You can do
See also here.