June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In this recipe, we will see how to choose font families and styles under the three most popular operating systems, namely, Windows, Mac OS X, and Linux.
We will only use the base graphics functions for this recipe. So, just open up the R prompt and type in the following code. You might wish to save the code as an R script for later use.
Let's look at all the basic default fonts available under Windows:
par(mar=c(1,1,5,1)) plot(1:200,type="n",main="Fonts under Windows",axes=FALSE,xlab="",ylab="") text(0,180,"Arial \n(family=\"sans\", font=1)", family="sans",font=1,adj=0) text(0,140,"Arial Bold \n(family=\"sans\", font=2)", family="sans",font=2,adj=0) text(0,100,"Arial ...
Read now
Unlock full access