Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ggsurvplot(): Plotting multiple surv objects on the same graph #195
(User request by-email)
In oncology, we wish to plot time on treatment, progression free survival and overall survival on the same graph (and often also stratified by treatment assignment).
A simple solution to add multiple surv object on the same graph wanted.
The R code to generate this type of plot would look like this:
ggsurvplot(c(PFS.fit, OS.fit), ...)
The plot would look like this:
Load required packages
Create a demo data set
Ex1: Combine null models
Ex2: Combine stratified curves
referenced this issue
Jun 15, 2017
I am in the same situation also. I just had to create a merged data.frame from the different sources to achieve a work around
Thanks for the post! It was really helpful but can we show the median survival time with the use of surv.median.line which is available in ggsurvplot when we combine the graphs? I tried it but couldn't get the median survival line. Please suggest me an option for the same .