Plotting survival curves in R with ggplot2
问题 I've been looking for a solution to plot survival curves using ggplot2. I've found some nice examples, but they do not follow the whole ggplot2 aesthetics (mainly regarding shaded confidence intervals and so on). So finally I've written my own function: ggsurvplot<-function(s, conf.int=T, events=T, shape="|", xlab="Time", ylab="Survival probability", zeroy=F, col=T, linetype=F){ #s: a survfit object. #conf.int: TRUE or FALSE to plot confidence intervals. #events: TRUE or FALSE to draw points