[英]Error: ! Problem while converting geom to grob. ℹ Error occurred in the 1st layer
I am running the examples at thislink .我正在运行此链接中的示例。 After re-installing ggiraph, the same code that was working before, returns this error
重新安装 ggiraph 后,之前运行的相同代码返回此错误
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.
Any suggestion?有什么建议吗?
Which version of ggplot2 are you using?您使用的是哪个版本的 ggplot2? I was having trouble with an identical error from ggforce.
我遇到了来自 ggforce 的相同错误。 In the end I got everything working with R 4.2.2, ggplot2 3.4.0, ggiraph 0.8.4 and ggforce 0.4.1.
最后,我得到了 R 4.2.2、ggplot2 3.4.0、ggiraph 0.8.4 和 ggforce 0.4.1 的所有功能。
I had a similar problem when using geom_freqpoly in ggplot.在 ggplot 中使用 geom_freqpoly 时,我遇到了类似的问题。 There seemed to be a problem with xlim().
xlim() 似乎有问题。 When I removed xlim() everything worked fine.
当我删除 xlim() 时,一切正常。 Restaring RStudio solved the problem for me.
重新启动 RStudio 解决了我的问题。 R version 4.2.2 ggplot2_3.4.0
R 版本 4.2.2 ggplot2_3.4.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.