Marker symbol and line rendered in wrong order
未關閉
還沒有人認領這個 Issue。
bug
difficulty: high
priority: medium
- 主要語言
- R
- 星號
- 2.7k
- 分支
- 641
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Given the code below, Plotly render the marker symbols and lines in wrong order. From df, you can see the point (3, 3) should be a circle without line. But it's rendered as a pentagon with the red circle:

library(plotly)
#> Loading required package: ggplot2
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
df <- data.frame(x = seq(1, 10), y = seq(1, 10),
Sample_Group = rep(c("N", "T"), 5),
Symbol = rep(c("circle", "pentagon"), 5))
df$Symbol_Line <- sapply(df$Symbol, function(x) {ifelse(x == "pentagon", 2, 0)})
df
#> x y Sample_Group Symbol Symbol_Line
#> 1 1 1 N circle 0
#> 2 2 2 T pentagon 2
#> 3 3 3 N circle 0
#> 4 4 4 T pentagon 2
#> 5 5 5 N circle 0
#> 6 6 6 T pentagon 2
#> 7 7 7 N circle 0
#> 8 8 8 T pentagon 2
#> 9 9 9 N circle 0
#> 10 10 10 T pentagon 2
p <- plot_ly(df, x = ~x, y = ~y,
type = "scatter", mode = "markers",
color = ~Sample_Group,
marker = list(symbol = ~Symbol,
size = 15,
line = list(width = ~Symbol_Line,
color = "red")))
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 issue #1155 中可重現的 R 範例開始,追蹤標記符號和標記線值如何傳遞到渲染路徑。完成的標準是點 (3, 3) 渲染為沒有線的圓,而五邊形點保留其紅線。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- r
- 領域
- data-visualization
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100