Individual marker styling inconsistent
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi, thank you for making and working on such a wonderful plotting package.
For one of the projects I'm working on, I'm trying to style individual markers, however it's inconsistent when trying to target individual markers. For example I want to make the fourth point as full opacity (1) and larger (15) while the others are at 0.2 and size 10. I would expect "sample4" to be at full opacity, but it's "sample3". Am I doing something wrong?
test_data <- data.frame(
x_data = c(2.8113, 5.8112, 7.3461, 15.5405, 16.3035),
y_data = c(2, 2, 2, 6, 3),
groups = c("group1", "group1", "group2", "group2", "group1"),
samples = c("sample1", "sample2", "sample3", "sample4", "sample5")
)
plotly::plot_ly(
test_data,
x = ~x_data,
y = ~y_data,
mode = "markers",
type = "scatter",
color = ~groups,
text = ~samples,
marker = list(
size = c(10, 10, 10, 15, 10),
opacity = c(0.2, 0.2, 0.2, 1, 0.2)
)
)
produces the following plot
Thanks a lot in advance!
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
Reproduzieren Sie das bereitgestellte plot_ly-Beispiel im Repository plotly.R und untersuchen Sie, wie gruppierte marker-Vektoren den geplotteten Punkten zugeordnet werden. Vergleichen Sie die angezeigte marker-Formatierung mit den angeforderten size- und opacity-Vektoren. Erledigt ist die Aufgabe, wenn sample4 size 15 und opacity 1 erhält, während die anderen Samples size 10 und opacity 0.2 erhalten.
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
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100