I am using the grid.arrange function to arrange a set of 4 plots and add a title to them. I would like to export the result as a pdf but whenever I do so, the font of the title (although not the font used in the plots themselves) changes. Is there some way to avoid this? The code is as follows
grid.arrange(
eeplot,
ueplot,
euplot,
uuplot,
nrow = 2,
top=textGrob("Worker Households", gp=gpar(fontsize=20,font=6))
)
In the viewer everything looks fine
but when I export the plot to pdf the result is this
As can be seen, the font of the title (but not that of the tick labels of the plots themselves) has changed.
EDIT: When I export individual plots made in ggplot2 to pdf, I do not run into this issue. It only occurs when using grid.arrange