plotly / plotly/plotly.R

Support ggplot2's custom group labelling

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

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

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

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

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

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