Want to change the font used in your R plots? I got a quite simple solution that works on Mac OS.

You need the function 'quartzFonts'. With this function, you can define additional font families to use in your R base graphic plots. The default font families are 'sans', 'serif' and 'mono'.

Let's say, I want to define a new font family with the 'Avenir' font. All I have to do is:

quartzFonts(avenir = c("Avenir Book", "Avenir Black", "Avenir Book Oblique", 

"Avenir Black Oblique"))

The first element of the vector is the normal face, then bold face, then italic face, then bold-italic font face. The bold face is used for the title of the plots, for example.

Now, R knows how to interpret the font family 'avenir'.
5
Blog Archive
BlogRoll
BlogRoll
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.