# Fit survival curves
require("survival")
fit<- survfit(Surv(time, status) ~ sex, data = lung)
# Basic plot
ggcumcensor(fit, data = lung)
# Change color by strata
# Remove y tick labels
ggcumcensor(fit, data = lung, color = "strata",
y.text = FALSE)
Run the code above in your browser using DataLab