Skip to content

Font family not getting applied to risk table and p-value in ggsurvplot #245

@Swechhya

Description

@Swechhya

I tried changing the font family for ggsurvplot using the following code:

library(survival)
library(survminer)
fit<- survfit(Surv(time, status) ~ sex, data = lung)
ggsurvplot(fit, risk.table = TRUE,  risk.table.pos = "in", pval = TRUE, ggtheme = theme_classic2(base_family = "Courier New"))

I got the following plot :
image

As you can see in the plot, font family gets applied to all the plot parameters except the risk table and p-value. Is there a way to resolve the issue?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions