简体   繁体   English

错误: 。 将 geom 转换为 grob 时出现问题。 ℹ 第一层出现错误

[英]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.

相关问题 当用作独立层时,ggoce 中的 geom_isopycnal 返回错误 - geom_isopycnal in ggoce returning error when used as standalone layer 嗨,我是一个新的 R 学习者。在编辑器上写了下面两个相同的代码,第二个运行正常,而第一个有错误..第一个有什么问题 - Hi am a new R learner.. wrote below two identical code on editior, 2nd one runs fine, while first one has error.. what is wrong with 1st one 使用Rserve执行“ for”循环时发生错误 - An error occurred while performing the 'for' loop using Rserve Geom_violin + geom_error_bar - Geom_violin + geom_error_bar 在虚拟变量的帮助下使用“linearHypothesis”命令时发生错误 - Error occurred while using "linearHypothesis" command with help of dummy variables 绘制两个图表出现错误:无法将 class 列表的 object 转换为 grob - Plotting two graphs getting the error: Cannot convert object of class list into a grob 错误:`summarise()` 输入`wt` 的问题:geom_net 函数与新的 dplyr 版本不兼容 - Error: Problem with `summarise()` input `wt`: geom_net function incompatible with new dplyr version 将R模型转换为pmml时出错 - Error while converting R models to pmml 在R中转换为日期格式时出错 - Error while converting to Date format in R 第1组的唯一值,然后是第1组和第2组,依此类推 - Unique values for the 1st group then the 1st and 2nd and so on
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM