r语言 - 错误:!将geom转换为grob时出现问题.第一层发生错误



我正在运行这个链接中的示例。重新安装gigraph后,与之前工作的相同代码返回此错误

Error:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `check.length()`:
! 'gpar' element 'lwd' must not be length 0
Run `rlang::last_error()` to see where the error occurred.

任何建议吗?

我在ggplot中使用geom_freqpoly时遇到了类似的问题。xlim()似乎有问题。当我删除xlim()时,一切都工作正常。重新启动RStudio解决了我的问题。R版本4.2.2ggplot2_3.4.0

您使用的是哪个版本的ggplot2 ?我遇到了来自ggforce的相同错误。最后,我用R 4.2.2、ggplot2 3.4.0、gggraph0.8.4和ggforce 0.4.1完成了所有工作。

使用st_zm(shapefile)应该可以解决这个问题。

最新更新