plot_ly boxplot showing wrong x-axis
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Suppose I have a list with three slots, but data for slots 2 and 3 are not yet available. When plotting a boxplot with just the first two slots, everything works as expected:
library(plotly)
y <- list("Group 1" = c(105,74,20),
"Group 2" = NA_real_,
"Group 3" = NA_real_)
boxplot <- plot_ly(type="box")
boxplot %>%
add_boxplot(x=y[[1]]) %>%
add_boxplot(x=y[[2]])

But when trying to plot data for all three slots (where slots 2 and 3 don't have data), then the x-axis label is messed up and the data seems to be messed up as well. (I expected the boxplot to look exactly the same as the one above.)
boxplot %>%
add_boxplot(x=y[[1]]) %>%
add_boxplot(x=y[[2]]) %>%
add_boxplot(x=y[[3]])

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 R-Reproduktion des Issues mit plot_ly(type="box") und aufeinanderfolgenden add_boxplot(x=y[[...]] )-Aufrufen auszuführen und dabei zwei Traces mit drei zu vergleichen. Verfolge, wie add_boxplot Eingaben von NA_real_ und die Zuweisung von Kategorien zur x-Achse behandelt. Erledigt ist die Aufgabe, wenn das Hinzufügen leerer Slots weder die angezeigten Daten noch die Beschriftung der x-Achse im Vergleich zum Beispiel mit zwei Slots verändert.
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
- 50/100