R/add_legend_title.R
add_legend_title.Rd
Add a default or custom title to the figure legend.
add_legend_title(title = NULL)
a string to override the default legend title. Default is NULL
NULL
a ggplot2 figure
Visit the gallery for examples modifying the default figures
survfit2(Surv(time, status) ~ surg, data = df_colon) %>% ggsurvfit() + add_legend_title() + scale_ggsurvfit()