subplot() doesn't account for dual axes
オープン
まだ誰も着手していません。
difficulty: high
priority: low
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I think there is something wrong with the subplot function when there is yaxis2
I tried to use subplot with 2 plots that have yaxis2. Each plot looks like this:

foo_plot <- function(n) {
x <- rnorm(n)
den <- density(x)
p <- plot_ly()
p <- add_trace(p, x=x, type="histogram", name="Histogram",
marker=list(line=list(color="#000", width=1), color="#555"))
p <- add_trace(p, x=den$x, y=den$y, yaxis="y2", name="Density",
type="scatter", mode="lines", line=list(color="#222"))
p <- layout(p,
yaxis2=list(overlaying="y", side="right", rangemode="nonnegative",
showgrid=F, showline=T, ticks="outside"),
yaxis=list(showline=T, ticks="outside"))
return(p)
}
p <- subplot(foo_plot(1000), foo_plot(1000), nrows=2, shareX=F, shareY=F)
The density curves were missing when I merge the two plots.

This is the result of sessionInfo()

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue の foo_plot と subplot の例を実行し、各プロットを結合した2行の結果と比較します。subplot による yaxis2 の処理を追跡し、結合後も両方の密度曲線が表示されたままであることを確認します。完了条件は、結合したプロットで2軸のトレースが正しくレンダリングされることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100