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
The font family is defined on the graph. I tried to define it with postscript(family="Times")and postscript(family="Times New Roman")without success.
I tried font_import()/ loadfonts(), but this causes more errors (after that it will not even appear on QUARTZ)
Check the disabled fonts in the font folder, Times New Roman is included.
Check the fonts available in R with names(postscriptFonts()), and it is.
As I said, the plot looks great in Quartz, but saves it as .eps with postscript, generates the specified error and an empty file.
Any ideas on how to solve?
user3620237