plotly / plotly/plotly.R

bug boxplot set to horizontal

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

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

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi, I've found a bug in ggplotly() when I want to draw an horizontal boxplot. The code that doesn't work is this:

au2=  ggplot(data) + geom_boxplot(aes_string(x = "Conc",  y ="Class"))+ 
    labs( x = "log2(Concentration)", title = "Density boxplot")
plotly::ggplotly(au2)

where "Conc" is continous and "Class" is discrete. ggplot correctly draw the graph, but when I use ggplotly(), the plot is almost empty (becomes empty if I put also fill = "Class")

in ggplot works fine:
ggplot_not
in plotly doesn't work:
plotly_not

If I reverse x and y everything works fine but the boxplot will be vertical. So in order to make an horizontal boxplot that kinda works in plotly I have to use coord_flip() in ggplot2. So this code:

au2 = ggplot(box_data) + geom_boxplot(aes_string(y = "Conc",  x ="Class")) +  
    labs( x = "log2(Concentration)", title = "Density boxplot") + coord_flip()
plotly::ggplotly(au2)

But I have a last problem with ticks. They are a bit rotated:

problem with ticks in plotly:
plotly_ok

What's happening??

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

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

はじめの一歩

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

調査の方向性

まず、報告された水平箱ひげ図を ggplot()、geom_boxplot()、plotly::ggplotly() で再現し、水平への直接マッピングと coord_flip() による回避策を比較します。連続軸と離散軸、fill、目盛りラベルの扱いを調査します。水平箱ひげ図が fill 付きで正しくレンダリングされ、目盛りが期待どおりの向きになれば完了です。

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

評価

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

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

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