library(survival)
library(survminer)
I am using the survminer package to plot unadjusted Kaplan Meier plots. I am calculating mortality comparing different exposures and I have a very specific problem: Is there a way to change the x axis labels of ggsurvplot? In my case I want to replace the timepoint 0 with 30, timepoint 20 with 50, timepoint 40 with 70 and timepoint 60 with 90.
I create my ggsurvplot using the code below:
fit31to90_Mortality <- survfit(msurv31to90DayMortality~Bacteria_Category, data =
Mortality_31to90_Days_Plot <-
ggsurvplot(fit31to90_Mortality, xlim = c(0,60),
break.x.by = 20, xlab = "Day", ylab = c("Survival probability"),
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)
Mortality_31to90_Days_Plot$plot