向 ggsurvplot 添加标题

use*_*890 2 plot r survival-analysis

我想为 ggsurvplot 添加标题。这是我的代码:

library(survival)
library(survminer)

fit <- survfit(Surv(time, status) ~ sex, data = lung)
ggsurvplot(fit, data =lung, main = "This is title")
Run Code Online (Sandbox Code Playgroud)

它生成情节,但没有标题。如果添加risk.table = TRUE,那么我会在风险表顶部获得标题,但不是主要情节。

library(survival)
library(survminer)

fit <- survfit(Surv(time, status) ~ sex, data = lung)
ggsurvplot(fit, data =lung, main = "This is title", 
           risk.table = TRUE)
Run Code Online (Sandbox Code Playgroud)

ggsurvplot 标题

知道如何修复它吗?

j.R*_*art 5

称呼标题为 with title =,而不是 with main =

ggsurvplot(fit, data =lung, title = "This is title", 
           risk.table = TRUE)
Run Code Online (Sandbox Code Playgroud)

Output_Link_Here 因为我想我太新了,无法嵌入