plotly / plotly/plotly.R

Bug: ggplotly with no open plots crashes R (from Rgui)

オープン
#1,150 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Windows の RGui で提供された qplot と ggplotly の例を再現し、その後、dev.new() の実行後に同じ例と比較します。ggplotly によるグラフィックスデバイスの処理を追跡し、プロットが開かれていない場合でも R がクラッシュしなくなり、例が引き続き描画されることを確認して修正を検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
r
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。