I try to edit the ylab in a ggsurvplot if I use the argument fun = "event". In this case, the ylab argument seems to be ignored and replaced by "cumulative event".
I used the code from this post Change x-axis labels for ggsurvplot for my attempt:
# code by Ian Campbell
tdata <- data.frame(time =c(1,1,1,2,2,2,3,3,3,4,4,4),
status=rep(c(1,0,2),4),
n=c(12,3,2,6,2,4,2,0,2,3,3,5))
fit <- survfit(Surv(time, time, status, type='interval') ~1,
data=tdata, weight=n)
myplot <- ggsurvplot(fit, xlim = c(0,60),
break.x.by = 20, xlab = "Day", ylab = "Survival probability",
fun = "event",
risk.table = "abs_pct", font.x = c(26, face = "bold"),
font.y = c(26, face = "bold"), font.tickslab = c(24),
font.legend = c(24), risk.table.fontsize = 7, risk.table.col = "black", size = 1)
myplot
Does anybody know what I do wrong?
Thank you!