subplot() fails to plot 6 plots in a 2 rows x 4 columns grid
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
subplots.R から開始し、subplot() が nrows、widths、heights を get_domains() に渡す流れを追跡します。Issue にある再現可能な 6 プロットの例を実行し、widths を指定した 2 行 4 列のレイアウトで、列の長さに関するエラーが発生しなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
I want to use subplot function to plot 6 ggplots in a 2 rows x 4 columns grid.
Here is a reproducible example:
figlist <- list()
for (i in 1:6) figlist[[i]] <- ggplot(data.frame(a = 1:3,b = 4:6), aes(a,b)) + geom_point()
subplot(figlist, nrows = 2, widths = rep(0.25,4))
This generates "Error: The length of the widths argument must be equal to the number of columns"
Looking into the code of subplots.R, the subplot function accepts arguments nrows, widths and heights, which appear to be passed through to get_domains.
The problem is that get_domains calculates ncols ignoring length(widths) and then generates an error when these don't match.
I would have expected get_domains to calculate ncols only if widths was not supplied.
I hope this helps.
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.R のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
save_image Error オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
plotly/plotly.R の issue をすべて見る
似ている issue
-
documentation pkg infrastructure
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
epiverse-trace/epiparameter#511 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
pharmaverse/aNCA#1496 ·
-
function:write_dwc
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
jbkunst/highcharter#849 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
r-lib/pkgdepends#485 · コメント 4 件 ·