New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conf.int does not react on custiomization of the theme #3

Closed
MarcinKosinski opened this Issue Feb 12, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@MarcinKosinski
Contributor

MarcinKosinski commented Feb 12, 2016

No description provided.

@MarcinKosinski

This comment has been minimized.

Show comment
Hide comment
@MarcinKosinski
Contributor

MarcinKosinski commented Feb 12, 2016

As here #2 (comment)

@kassambara

This comment has been minimized.

Show comment
Hide comment
@kassambara

kassambara Feb 12, 2016

Owner

Thank you Marcin for contributing to improve ggsurvplot function.

  • I agree with you that using +scale_colour_tableau() will change only survival curve line colors.
  • To change also conf.int fill color, don't you think that one simple solution would be to add +scale_fill_tableau()?
library(RTCGA) # survivalTCGA is github only function
library(RTCGA.clinical)
library(survminer)
library(survival)
library(ggthemes)

survivalTCGA(BRCA.clinical, OV.clinical, 
                         extract.cols = "admin.disease_code") -> BRCAOV.survInfo

fit <- survfit(Surv(times, patient.vital_status)~admin.disease_code,
                             data = BRCAOV.survInfo)


# Customize the output and then print
#++++++++++++++++++++++++++++++++++++
res <- ggsurvplot(fit, pval = TRUE, conf.int = TRUE,
                                    risk.table = TRUE)
res$table <- res$table + theme_igray() + scale_colour_tableau() 
res$plot <- res$plot + theme_igray() + scale_colour_tableau() +scale_fill_tableau() + labs(title = "Survival Curves")
print(res)
Owner

kassambara commented Feb 12, 2016

Thank you Marcin for contributing to improve ggsurvplot function.

  • I agree with you that using +scale_colour_tableau() will change only survival curve line colors.
  • To change also conf.int fill color, don't you think that one simple solution would be to add +scale_fill_tableau()?
library(RTCGA) # survivalTCGA is github only function
library(RTCGA.clinical)
library(survminer)
library(survival)
library(ggthemes)

survivalTCGA(BRCA.clinical, OV.clinical, 
                         extract.cols = "admin.disease_code") -> BRCAOV.survInfo

fit <- survfit(Surv(times, patient.vital_status)~admin.disease_code,
                             data = BRCAOV.survInfo)


# Customize the output and then print
#++++++++++++++++++++++++++++++++++++
res <- ggsurvplot(fit, pval = TRUE, conf.int = TRUE,
                                    risk.table = TRUE)
res$table <- res$table + theme_igray() + scale_colour_tableau() 
res$plot <- res$plot + theme_igray() + scale_colour_tableau() +scale_fill_tableau() + labs(title = "Survival Curves")
print(res)
@MarcinKosinski

This comment has been minimized.

Show comment
Hide comment
@MarcinKosinski

MarcinKosinski Feb 13, 2016

Contributor

Yes, sorry for the mess #2 (comment)

Contributor

MarcinKosinski commented Feb 13, 2016

Yes, sorry for the mess #2 (comment)

kassambara pushed a commit that referenced this issue Mar 29, 2016

kassambara pushed a commit that referenced this issue Apr 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment