Ticktext doesn't show for some numerical values in parallel coordinates plotting.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Currently, I am trying to plot categorical variables in plotly. I run this
(This has incorrect result)
library(plotly)
p <- plot_ly(type = 'parcoords', line = list(color = 'blue'),
dimensions = list(
list(range = c(1,5),
constraintrange = c(1,2),
label = 'A', values = c(1,4)),
list(range = c(1,5),
tickvals = c(1.5,3,4.5),
label = 'B', values = c(3,1.5)),
list(range = c(1,2),
tickvals = c(1,2),
label = 'C', values = c(2,4),
ticktext = c('0','1')),
list(range = c(1,5),
label = 'D', values = c(4,2))
)
)
p
and this: (this has correct, expected result)
library(plotly)
p <- plot_ly(type = 'parcoords', line = list(color = 'blue'),
dimensions = list(
list(range = c(1,5),
constraintrange = c(1,2),
label = 'A', values = c(1,4)),
list(range = c(1,5),
tickvals = c(1.5,3,4.5),
label = 'B', values = c(3,1.5)),
list(range = c(1,2),
tickvals = c(1,2),
label = 'C', values = c(2,4),
ticktext = c(' 0 ',' 1 ')),
list(range = c(1,5),
label = 'D', values = c(4,2))
)
)
p
Notice that the only change is the 3rd ticktext. With spaces, it works correctly but without, it doesn't. Swapping the ('0', '1') out with ('1', '2') or ('male', 'female') also works correctly.
Expected behavior: There should be a 0 label at the bottom and 1 at the top.
Actual behavior: The top label is missing.
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 damit, die beiden R plot_ly parcoords-Beispiele aus dem Issue auszuführen, und vergleiche die ticktext-Werte mit und ohne Leerzeichen. Verfolge die Verarbeitung der Tick-Beschriftungen für parallele Koordinaten von diesem Einstiegspunkt aus; abgeschlossen ist die Aufgabe, wenn beide numerischen Beschriftungen, einschließlich der obersten 1, ohne hinzugefügte Leerzeichen gerendert werden.
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
- 42/100