For a categorical colour aesthetic, there appears to be no documented way to use selectedpoints to select individual points.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
plot_ly() のドキュメントとカテゴリカルカラーの例から始めて、colour がどのように個別の trace を作成し、selectedpoints がどのように渡されるかを追跡します。完了条件は、生成された各 trace 内のポイントを選択するための、文書化された一貫した方法を提供し、提示された例と提案された R-style のインデックス動作をカバーすることです。
索引モデルが issue の本文から書いたものです。
説明
The following example highlights the first point from each colour group (the first "a" point and the first "b" point):
library(plotly)
d <- data.frame(x = 1:4, c = c("a", "a", "b", "b"))
plot_ly(d) |>
add_trace(x=~x, y = ~x, color = ~c, type = "scatter", selectedpoints = list(0))
From the plot_ly() documentation, it appears that this code implicitly creates multiple traces, one for each colour, so this behaviour makes sense on this level (even if it's surprising). However, there appears to be no documented way to access individual traces. I've tried a number of permutations
In my opinion, if the code is going to transparently create multiple traces like that, it should also transparently map selectedpoints provided by the user (ideally as 1-based indexes or logical vectors, for consistency with R) to their positions within each trace.
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.R のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 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
plotly/plotly.R の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
robjhyndman/forecast#1220 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
JamesHWade/deputy#192 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug triage_needed
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pharmaverse/rtables#1123 · コメント 1 件 · リアクション 1 件 ·