在调用ggsave时,我收到以下奇怪的警告:
> ggsave(filename='/Users/bravegag/Dropbox/CV/skills.pdf', width=12, height=6)
Warning messages:
1: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
unknown AFM entity encountered
2: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
unknown AFM entity encountered
3: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
unknown AFM entity encountered
4: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
unknown AFM entity encountered
有没有办法解决/修复此问题?如果这足以诊断问题,我宁愿不共享代码。请注意,情节完美无缺。
更新:这些是我的依赖项,包括外部字符,问题发生在Mac OS X和Windows中。
rm(list=ls()) # clear workspace
library(ggplot2) # use ggplot2 library
library(directlabels)
library(scales)
library(extrafont)
library(extrafontdb)
loadfonts(device="pdf",quiet=TRUE)