-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Not a big deal: ggtitle()
overwrites subtitle
ggplot(data=mtcars, aes(x=mpg, y=cyl)) + geom_point() + labs(title="title", subtitle="subtitle")
p = last_plot()
p + ggtitle("title2") # overwrites subtitle
p + labs(title="title2") # does not overwrite subtitle
Below I tried to use reprex(clipr::read_clip())
, but it doesn't seem to work too well...
#> [1] "library(ggplot2)"
#> [2] "ggplot(data=mtcars, aes(x=mpg, y=cyl)) + geom_point() + labs(title="title", subtitle="subtitle")"
#> [3] "p = last_plot()"
#> [4] "p + ggtitle("title2") # overwrites subtitle"
#> [5] "p + labs(title="title2") # does not overwrite subtitle"
Metadata
Metadata
Assignees
Labels
No labels