Bubble plot still ignores size constraints for singleton color categories
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
As you can see in the following reprex, the sizing options get ignored for the singleton category (color == "D"); commit https://github.com/plotly/plotly.R/commit/306b4ef057631f9d3200fdfce636696bc0268952 seemed intended to fix this issue but it persists.
library(plotly)
library(dplyr)
dat = structure(list(color = c("A", "A", "A", "B", "B", "C", "C", "D"
), size = c(2L, 1L, 1L, 803L, 254L, 339L, 261L, 577L), x = c(0,
0, 0, 32.9, 52, 20.4, 33.3, 73.7), y = c(0, 0, 0, 0.7, 0.8, 0.6,
0, 0.2)), row.names = c(NA, -8L), class = c("tbl_df", "tbl",
"data.frame"))
print(dat)
desired_maximum_marker_size = 10
sizeref <- 2 * max(dat$size) / (desired_maximum_marker_size^2)
plotly::plot_ly(
data = dat,
y = ~y,
x = ~x,
color = ~color,
type = "scatter",
mode = 'markers',
sizes = c(1, desired_maximum_marker_size),
marker = list(
size = ~size,
sizemin = 1,
sizemax = 10,
opacity = 0.7,
sizeref = sizeref,
sizemode = 'area')
)

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された R reprex を plotly で実行し、観測値が1つだけの色カテゴリがマーカーサイズの制約を無視することを確認してください。色カテゴリの観測値が1つの場合にマーカーサイズがどのように処理されるかを追跡し、そのケースを対象とするリグレッションテストを追加してください。完了条件は、観測値が1つだけのカテゴリが、他のカテゴリと一貫して sizemin、sizemax、sizeref、sizemode に従うことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100