【发布时间】:2014-04-23 00:04:18
【问题描述】:
我正在尝试开始使用xkcd 包,并按照the vignette 中的说明进行操作。然而,当我到达第 2.2 节“保存图表”时,我得到了一个错误。
代码如下:
font.add("xkcd", regular = "xkcd.ttf")
p <- ggplot() + geom_point(aes(x=mpg, y=wt), data=mtcars) +
theme(text = element_text(size = 16, family = "xkcd"))
print(p)
这是错误:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found
In addition: Warning messages:
1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "xkcd"
2: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "xkcd"
我错过了什么??
【问题讨论】:
-
您是否安装了第 2.1 节中描述的字体?
-
是的!在lot of trouble之后。
标签: r