有偿解答| ggplot2画图总是显示找不到多边形的边

  • 问题:调用ggplot2画图时总是显示 polygon edge not found

img


和代码无关,直接复制的代码;

img

尝试下这个是否可以帮助你:
三个办法:

办法一:

刚刚从 RStudio IDE 遇到这个问题。错误是零星的,有时它有效,有时它会抛出错误。要解决此问题,请在 geom_sf 之前添加“theme_void()”。
例子:

ggplot(data = df_sf) +
   **theme_void() +**
   geom_sf()

办法二:

字体问题,字体没有安装问题等,确保你笔记本有这个字体了,不过你好像已经重装过了,跳过.
或者重启笔记本

办法三:(2021年7月29日某人github回答的)

I saw the polygon edge not found error again, associated with ggplot() calls in CRAN checks on OSX-arm64,
search for stars3.Rmd in

,
or for sf5.Rmd in
Check results for 'sf' https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/sf-00check.html


以上三个答案来源于Github Issure: (建议直接翻到底部,为最新事件的回答)