kassambara / survminer

Survival Analysis and Visualization
https://rpkgs.datanovia.com/survminer/
504 stars 162 forks source link

How to change title font size for both risk and censor table? #567

Open arbet003 opened 2 years ago

arbet003 commented 2 years ago

Hello,

When showing both the risk table and censoring table, how can I change the title font sizes for each? I would like to make both title font sizes smaller.

library(survminer)
library(survival)
fit<- survfit(Surv(time, status) ~ 1, data = lung)

ggsurvplot(fit, data = lung,
           risk.table = "nrisk_cumevents",
           cumcensor=T,
           tables.theme = clean_theme(),
           tables.height=0.15,
           fontsize = 4)

kmplot

haodafa2019 commented 1 year ago

ggsurv <- ggsurvplot(fit, data = lung, risk.table = "nrisk_cumevents", cumcensor=T, tables.theme = clean_theme(), tables.height=0.15, fontsize = 3) ggsurv$table <- ggsurv$table+ theme( plot.title = element_text(size = 8) ) ggsurv$ncensor.plot <-ggsurv$ncensor.plot+ theme( plot.title = element_text(size = 8) ) ggsurv