In my study I am generating various graphs using R. I see that most of the graphs come up with a Sans Serif type font with various sizes.
How to I change all the te
Here's a ggplot solution using WindowsFonts(...)
windowsFonts(Times=windowsFont("Times New Roman"))
library(ggplot2)
ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
ggtitle("Fuel Efficiency of 32 Cars") +
xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") +
theme_bw() +
theme(text=element_text(family="Times", face="bold", size=12)) #Times New Roman, 12pt, Bold

As you can see, the text really is Times New Roman.
The main idea is that whatever name you give the font internally in R, using
windowsFonts(name=windowsFont("system name"))
you should use to reference the font in
theme(text=element_text(family="name",...),...)