ggplot2 pdf import in Adobe Illustrator missing font AdobePiStd

Sander picture Sander · Apr 3, 2012 · Viewed 23.5k times · Source

I created several simple ggplot2 plots and saved them to PDF files using the following commands:

p <- ggplot(plotobject, aes(x=Pos, y=Pval),res=300)
ggsave(plot=p,height=6,width=6,dpi=200, filename="~/example.pdf")

If I now open this example.pdf in Adobe Illustrator I get the following error:

The font AdobePiStd is missing. Affected text will be displayed using a substitute font.

Is there a way in ggplot2 to specify a font (I presume this is for the dots/points) that Adobe will understand or otherwise is there a way to get this font working in Adobe?

/edit just to clarify, the text/labels/titles are all just fine its the dots that are missing for the font /edit2 I got a working solution by just using the EPS output in ggsave, but still would love to find out a way to also be able to just open/import ggplot2 plots in PDF format directly in AI

Answer

bdusenbery picture bdusenbery · Feb 13, 2014

Although changing the fonts used by AI works well, an alternative is to restrict ggplot2 from using Dingbats in the first place by adding the argument 'useDingbats' to your ggsave command eg:

ggsave(plot=p,height=6,width=6,dpi=200, filename="~/example.pdf", useDingbats=FALSE)