0

How can I force ggplot2 to use Sherman Serif font by default in all parts of a plot including title, y.axis, x.axis, etc? Preferably, I would like to do this once at the beginning of my syntax.

Thanks,

Nader

Nader Mehri
  • 514
  • 1
  • 5
  • 21
  • 1
    If the font is already installed to your OS and imported to your environment, you just need to do `theme_set(theme_xx(base_family="Sherman Serif"))` (please use the exact font name after `base_family=`). – yh6 Feb 26 '21 at 02:36
  • Thanks! How can I make sure my font of interest has been installed and imported to my environment? – Nader Mehri Feb 26 '21 at 02:41
  • Also, I got an error: could not find function "theme_xx" – Nader Mehri Feb 26 '21 at 02:42
  • 1) I'm sorry I don't fully understand font issues in R, but it seems that `extrafont::fonts()` lists up all the existing font names so please check if it's there. 2) Please use the theme you prefer: `theme_gray`, `theme_bw`, etc. – yh6 Feb 26 '21 at 02:47

0 Answers0