Bug: ggplotly with no open plots crashes R (from Rgui)
未关闭
还没有人认领这个 Issue。
ggplotly
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Example:
library(ggplot2)
library(plotly)
p <- qplot(mpg, data=mtcars, geom="density", fill=gear, alpha=I(.5),
main="Distribution of Gas Milage", xlab="Miles Per Gallon",
ylab="Density")
ggplotly(p) # crashes R when used in RGui
The following would make gui not crash:
library(ggplot2)
library(plotly)
p <- qplot(mpg, data=mtcars, geom="density", fill=gear, alpha=I(.5),
main="Distribution of Gas Milage", xlab="Miles Per Gallon",
ylab="Density")
dev.new()
ggplotly(p) # crashes R when used in RGui
My session: (I'm using the latest ggplot2 and plotly)
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255
[3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C
[5] LC_TIME=Hebrew_Israel.1255
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] plotly_4.7.1.9000 ggplot2_2.2.1.9000 installr_0.20.0 stringr_1.2.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 compiler_3.4.1 plyr_1.8.4
[4] bindr_0.1 tools_3.4.1 digest_0.6.12
[7] jsonlite_1.5 tibble_1.3.4 gtable_0.2.0
[10] viridisLite_0.2.0 pkgconfig_2.0.1 rlang_0.1.4
[13] shiny_1.0.3 crosstalk_1.0.0 yaml_2.1.14
[16] bindrcpp_0.2 dplyr_0.7.4.9000 httr_1.3.1
[19] htmlwidgets_0.9 grid_3.4.1 tidyselect_0.2.3
[22] glue_1.2.0 data.table_1.10.4-3 R6_2.2.2
[25] purrr_0.2.4 tidyr_0.7.2 magrittr_1.5
[28] scales_0.5.0.9000 htmltools_0.3.6 assertthat_0.2.0
[31] xtable_1.8-2 mime_0.5 colorspace_1.3-2
[34] httpuv_1.3.5 labeling_0.3 stringi_1.1.5
[37] lazyeval_0.2.1 munsell_0.4.3
This was first found through: https://github.com/talgalili/heatmaply/issues/121
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 Windows 上的 RGui 中重现提供的 qplot 和 ggplotly 示例,然后将其与执行 dev.new() 后的同一示例进行比较。跟踪 ggplotly 对图形设备的处理,并通过验证未打开绘图的情况下不再导致 R 崩溃且示例仍能渲染来确认修复有效。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100