我刚刚在Mac OS X上安装了RStudio,版本10.7.3执行以下命令后
library(ggplot2)
qplot(mpg, wt, data=mtcars)
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
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 "Arial"
2: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "Arial"
Run Code Online (Sandbox Code Playgroud)
任何想法,重启都没有用!!
干杯
我知道这个问题的标题是这个问题和本问题的重复,但那里的解决方案对我不起作用,错误信息(略有)不同:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
polygon edge not found
Run Code Online (Sandbox Code Playgroud)
(注意缺少字体的缺失部分)
我尝试了所有的建议(更新/重新安装所有加载的图形软件包,ggplot2,GGally和scale,在安全模式下重新启动Mac OSX上的字体,将字体从/字体/(已禁用)移回/字体. ..)但没有一个解决了这个问题.
当我绘制ggplot图时,似乎出现错误
scale_y_continuous(label=scientific_10)
Run Code Online (Sandbox Code Playgroud)
在哪里scientific_10定义为
scientific_10 <- function(x) {
parse(text = gsub("e", " %*% 10^", scientific_format()(x)))
}
Run Code Online (Sandbox Code Playgroud)
因此,我怀疑scales图书馆与它有关.
最令人费解的是,错误只发生在每次这么多次,也许每次第3次或第5次我试图绘制相同的图...
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gridExtra_2.0.0 scales_0.3.0 broom_0.4.0 tidyr_0.3.1 ggplot2_1.0.1 GGally_0.5.0 …Run Code Online (Sandbox Code Playgroud)