Help with ggboxplot font change for stats

Hi All,
I am trying to change font for the ggboxplot. I was able to change the font to "Calibri" for X and Y axis labels and numbers but the on-plot stats remains unchanged. I did tried setting the theme_set() globally but still the same issue. I am really stuck with this. Can somebody please advice/help? Here is the code I am using. Thank you.

library(ggpubr)
library(tidyverse) 
leaf = read.table("~/filename.tsv", header = TRUE, sep = "\t")
my_comparisons <- list( c("7", "14"), c("14", "21"), c("21", "28"), c("7", "28"))
P <- ggboxplot(leaf, x = "TimePoint", y = "Shannon", color = "black", legend = "none", xlab = "DAP", ylab = "Shannon Index") + 
  theme(text = element_text(size = 12, family = "Calibri")) +
  stat_compare_means(comparisons = my_comparisons, bracket.size = 0.5, label.y = c(4.5, 4.8, 5, 5.5)) + 
  stat_compare_means(label.y = 6)
ggpar(P, ylim = c(0,6))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.