Support ggplot2's custom group labelling
オープン
まだ誰も着手していません。
enhancement
ggplotly
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi,
I found issues related to ggplot2's legend positioning, but couldn't find any addressing the fact that ggplotly ignores group labels changed by scale_color_discrete (or similar).
In contrast, it is able to handle a change in tick labels done in a similar manner using scale_x_discrete. You can find an example below with the iris dataset.
It would be great if you could add support to this!
# change in tick labels supported
gg <- ggplot(iris, aes(x=Species, y=Sepal.Width)) +
geom_boxplot() +
scale_x_discrete(labels=c("a", "b", "c)"))
gg
ggplotly(gg)
# change in group labels not supported
gg <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, group=Species, color=Species)) +
geom_point() +
scale_color_discrete(labels=c("a", "b", "c"))
gg
ggplotly(gg)
Great work!
Mariana Oliveira
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されている iris の例を ggplotly で実行し、scale_x_discrete でサポートされている目盛りラベルと、scale_color_discrete でサポートされていないグループラベルを比較します。ggplotly が ggplot2 のスケールをどのように凡例データへ変換するかを追跡します。カスタムのグループラベルである "a"、"b"、"c" が結果の凡例に表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100