I am using R on a macbook.
This code:
postscript("plot.eps")
ggplot(SomeData, aes (x=Cue, y=var1, group=var2, color=var2, shape=var2)) +
geom_line(size=0.5) +
geom_point(size = 3) +
geom_errorbar(aes(ymin=Var1-ci, ymax=Var1+ci), width=0.15, size=0.5) +
xlab("Var1") + ylab("Var2")+
coord_cartesian(ylim=c(600, 675)) +
theme(axis.text = element_text(colour = "black")) +
scale_colour_manual(values=darkcols) +
theme(text = element_text(size=16, family="Times New Roman")) +
theme(legend.position="bottom")
dev.off()
returns this error:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
family 'Times New Roman' not included in postscript() device
Font family is defined on the plot. Tried defining it with postscript(family="Times")
and postscript(family="Times New Roman")
with no success
Tried font_import()
/ loadfonts()
, but doing that generates more errors (Plot wont even show up on QUARTZ after doing this)
Checked the disabled fonts in the font folder, Times New Roman is enabled.
Checked the fonts available in R with names(postscriptFonts())
and it is there.
Like I said, plot looks perfectly in Quartz, but saving it as .eps with postscript generates the mentioned error and a blank file.
Any ideas on how to solve?