Skip to contents

Add a default or custom title to the figure legend.

Usage

add_legend_title(title = NULL)

Arguments

title

a string to override the default legend title. Default is NULL

Value

a ggplot2 figure

See also

Visit the gallery for examples modifying the default figures

Examples

survfit2(Surv(time, status) ~ surg, data = df_colon) %>%
  ggsurvfit() +
  add_legend_title()