Why is pval.size ignored by ggsurvplot_facet()?
I am trying to change the size of the p-value text in my survival plot using ggsurvplot_facet(), but the call to pval.size appears to be ignored. If anyone can help me change p-value size in my survival plot it would be very much appreciated.
Reproducible example:
library(survival); library(survminer)
fit <- survfit( Surv(time, status) ~ sex, data = colon)
ggsurvplot_facet(fit, colon, facet.by = "rx", palette = "jco", pval = TRUE, pval.size = 20)
ggsurvplot_facet(fit, colon, facet.by = "rx", palette = "jco", pval = TRUE, pval.size = 1)
The simple answer is that pval.size is not a named parameter in this function, and the function doesn't do anything with it when you pass it in.
You would have to change the body of the function to achieve a change in the size of the pval label. Here's how to create a modified function that takes the p value size parameter:
So now you can do:
Which gives this:
Then you can do
Which gives this: