Marker symbol and line rendered in wrong order
Offen
Dieses Issue hat noch niemand übernommen.
bug
difficulty: high
priority: medium
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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")))
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem reproduzierbaren R-Beispiel in Issue #1155 und verfolge, wie die Werte für Markersymbol und Markerlinie an den Rendering-Pfad übergeben werden. Als abgeschlossen gilt, wenn der Punkt (3, 3) als Kreis ohne Linie gerendert wird, während Pentagonpunkte ihre rote Linie behalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100