ggplotly() bar chart render issue
オープン
まだ誰も着手していません。
bug
ggplotly
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
ggplotly() renders a layered bar chart incorrectly; results in stacked bars, see the figures. Any way to remedy? Thanks, Kimmo
data_before = data.frame(
year = c(2014,2014,2014,2015,2015,2015,2016,2016,2016),
pet = c("dog","cat","bird","dog","cat","bird","dog","cat","bird"),
wt = c(56, 25, 26, 10, 19, 41, 16, 17, 13)
)
data_after = data.frame(
year = c(2014,2014,2014,2015,2015,2015,2016,2016,2016),
pet = c("dog","cat","bird","dog","cat","bird","dog","cat","bird"),
wt = c(49, 18, 19, 3, 12, 34, 9, 10, 6)
)
ggplot()+
geom_bar(data=data_before,aes(year,wt,fill=pet),stat="identity",position="dodge",width = 0.9,alpha=0.5)+
geom_bar(data=data_after,aes(year,wt,fill=pet),stat="identity",position="dodge",width = 0.9)+
xlab("Year") +
ylab("Weight")
ggplotly()
ggplot chart (correct):

ggplotly() render (incorrect)

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された R の再現コードを実行し、ggplot と ggplotly の図を比較します。その際、position="dodge" を使用している 2 つのレイヤー化された geom_bar 呼び出しに注目してください。次に、このチャートがどのように変換され、レンダリングされるかを追跡し、ggplotly の結果で、元のチャートに示された個別に dodge された棒と透明度が保持されていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100