I want to create a KM curve with 95%-CI with the x-axis zoomed in to show values between 0-60 months. This all works fine with ggsurvplot untill I use xlim.
ggsurvplot(fitLC, data = KMSCC,
risk.table = TRUE,
conf.int=TRUE,
pval = TRUE,
break.x.by = 12,
xlab ="Time in Months",
ylab="Relative Survival",
ggtheme = theme_minimal(),
risk.table.y.text.col = T,
risk.table.y.text = FALSE)
ggsurvplot(fitLC, data = KMSCC,
risk.table = TRUE,
conf.int=TRUE,
pval = TRUE,
break.x.by = 12,
xlab ="Time in Months",
xlim = c(0, 60),
ylab="Relative Survival",
ggtheme = theme_minimal(),
risk.table.y.text.col = T,
risk.table.y.text = FALSE)
Concluding, is there a way to zoom in to the preferred x-axis values without changing the higher x-axis values to NA? See also: https://github.com/kassambara/survminer/issues/4 How can I change xlim mode to Cartesian coordinates?
I can't give the data seen in the plot, but for reproducibility sake here's an example dataset in a Google sheet.