Change Font Type in ggplot2

In ggplot2 how can I change the font type, for example, to Calibri or Times New Roman?

Change the font in the theme.

ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
  ggtitle("Fuel Efficiency of 32 Cars") +
  xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") +
  theme(text=element_text(size=16, family="gentium"))

I used **Gentium** as I am on Linux and do not have Calibri or Times New Roman installed.

Example taken from Change fonts in ggplot2, and create xkcd style graphs | R-bloggers

@jrkrideau Thank you

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.