Add plot title or caption
Arguments
- plot
A
tidyplot
generated with the functiontidyplot()
.- title
Title of the plot.
Caption of the plot.
Details
add_title()
andadd_caption()
support plotmath expressions to include special characters. See examples and Advanced plotting.
Examples
study %>%
tidyplot(x = treatment, y = score) %>%
add_data_points_beeswarm() %>%
add_title("This is my title")
study %>%
tidyplot(x = treatment, y = score) %>%
add_data_points_beeswarm() %>%
add_caption("This is the fine print in the caption")
# Plotmath expression
study %>%
tidyplot(x = treatment, y = score) %>%
add_data_points_beeswarm() %>%
add_title("$H[2]*O~and~E==m*c^{2}$")