3D scatter plot not drawn by z-axis order when alpha != 1
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When creating a 3D scatter plot, the dots should be drawn in the order of depth, so drawing the furthest dot first, to get the right occlusion. This works well when alpha = 1, but when alpha < 1 the dots seem to be drawn in order of categories instead.
Here's a simple example. If you rotate it so the green dot is at the forefront, it is nevertheless occluded by the blue dot:
library(plotly)
plot_ly(data = data.frame(x = c(1, 1),
y = c(1, 2),
z = c(1, 1),
class = c("A", "B")),
x = ~x,
y = ~y,
z = ~z,
color = ~class,
alpha = 0.9)
This especially problematic when you have a lot of dots, and a cluster of nearby dots is completely hidden by a faraway cluster of dots of a different color.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotly_4.10.0 ggplot2_3.3.5
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 pillar_1.6.4 compiler_4.0.3 later_1.3.0 RColorBrewer_1.1-2 tools_4.0.3 digest_0.6.28
[8] viridisLite_0.4.0 jsonlite_1.7.2 lifecycle_1.0.1 tibble_3.1.5 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.11
[15] shiny_1.7.1 DBI_1.1.1 crosstalk_1.1.1 yaml_2.2.1 fastmap_1.1.0 httr_1.4.2 withr_2.4.2
[22] dplyr_1.0.7 htmlwidgets_1.5.4 generics_0.1.0 vctrs_0.3.8 grid_4.0.3 tidyselect_1.1.1 data.table_1.14.2
[29] glue_1.4.2 R6_2.5.1 fansi_0.5.0 farver_2.1.0 tidyr_1.1.4 purrr_0.3.4 magrittr_2.0.1
[36] scales_1.1.1 promises_1.2.0.1 ellipsis_0.3.2 htmltools_0.5.2 assertthat_0.2.1 mime_0.12 colorspace_2.0-2
[43] xtable_1.8-4 httpuv_1.6.3 utf8_1.2.2 lazyeval_0.2.2 munsell_0.5.0 crayon_1.4.1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された plot_ly の 3D 散布図の例を alpha = 0.9 で再現し、alpha = 1 の場合と深度順序を比較するために回転させます。z 軸の順序付けとカテゴリーベースの描画に関するレンダリングパスを追跡し、その後、半透明の点がカテゴリーではなく深度によってオクルージョンされることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- d3js, javascript, r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100