Is it possible to change the font family of the p-value in the following ggpboxplot? The font family should be "Times New Roman".
Using theme_bw(base_family = "Times New Roman"), does not change the p-value.
library(ggpubr)
library(ggplot2)
data("ToothGrowth")
# Box plot
p <- ggboxplot(ToothGrowth, x = "supp", y = "len",
color = "supp", palette = "jco",
add = "jitter",
facet.by = "dose", short.panel.labs = FALSE)
p + stat_compare_means(label = "p.format")
p + theme_bw(base_family = "Times New Roman")
I also tried it with normal theme(text = ...). It does not work.
# Box plot
p <- ggboxplot(ToothGrowth, x = "supp", y = "len",
color = "supp", palette = "jco",
add = "jitter",
facet.by = "dose", short.panel.labs = FALSE)
p + stat_compare_means(label = "p.format")
p + theme(text = element_text(family = "Times New Roman"))
Please note: I took the example from the following website: https://rpkgs.datanovia.com/ggpubr/reference/stat_compare_means.html
Thank you very, very much!
All the best, Aenna