Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
733 views
in Technique[技术] by (71.8m points)

r - ggplot2 pdf import in Adobe Illustrator missing font AdobePiStd

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...