Create base ggplot for survival curves

create_base_plot(
  df,
  type,
  xlab = "Time",
  ylab = "Survival Probability",
  multiple_lines,
  plot.event = 1,
  event = "col",
  lsize = 0.5,
  fsize,
  col,
  linetype = NULL,
  legend.pos = "bottom",
  legend.title = NULL,
  times,
  ylim = c(0, 1),
  xlim = NULL,
  main = NULL
)

Arguments

df

Plotting dataframe

type

Plot type ("KM" or "CIF")

xlab

x axis label

ylab

y axis label

multiple_lines

Whether multiple strata

plot.event

Events to plot

event

How to distinguish events ("col" or "linetype")

lsize

Line size

fsize

Font size

col

colours vector

linetype

Line types vector

legend.pos

Legend position

legend.title

Legend title

times

Time breaks

ylim

Y-axis limits

xlim

X-axis limits

main

Plot title