My issues with producing publication-grade figures in ggplot continue (see here)
Here's some reproducible code that throws the error.
library(bayesplot)
df <- data.frame(xVar = rnorm(1e4,0,1))
t <- bayesplot::mcmc_trace(df,"xVar")
t
All good. But when I try to save the figure as an eps (which many journals demand)
ggplot2::ggsave(filename = "tPlot.eps",
plot = t1,
device = "eps",
dpi = 1200,
width = 15,
height = 10,
units = "cm")
I get the error
Error in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)) :
family 'serif' not included in postscript() device
Has anyone encountered this sort of problem and found a solution?