plotly / plotly/plotly.R

subplot - merging titles following ggplotly conversion

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

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

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

説明

data(faithful)

p1 <- plotly::ggplotly(
  ggplot(faithful, aes(x = eruptions)) + 
    geom_histogram(bins = 20) + 
    theme_minimal()  + 
    labs(title = "A.")
)

p2 <- plotly::ggplotly(
  ggplot(faithful, aes(x = waiting)) + 
    geom_histogram(bins = 20) + 
    theme_minimal()  + 
    labs(title = "B.")
)

pl <- subplot(p1, p2, nrows = 1, titleX = TRUE)

## note  that changing to labs(tag = "A.") results in loss of the 'tag' at the ggplotly function.  

I am creating a gglot (histogram, in this case) which includes a sub-panel label. I want to then convert to a plotly figure using the plotly::ggplotly function. The label is transmitted faithfully to each of p1 and p2. However, when combining these into a subplot, the label seems to be merged . I lose the 'A.' label on the first plot p1, generally. The titleX option does not prevent this from occurring.

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

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

はじめの一歩

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

調査の方向性

ggplotly と subplot を使用した再現可能な faithful データの例から始め、次に titleX が有効な場合に subplot が p1 と p2 のタイトルをどのように結合するかを追跡します。labs(title = "A.") と labs(title = "B.") について動作を確認します。変換と結合の後も両方のラベルが表示されたままであれば完了です。

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

評価

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

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

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