bug boxplot set to horizontal
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, I've found a bug in ggplotly() when I want to draw an horizontal boxplot. The code that doesn't work is this:
au2= ggplot(data) + geom_boxplot(aes_string(x = "Conc", y ="Class"))+
labs( x = "log2(Concentration)", title = "Density boxplot")
plotly::ggplotly(au2)
where "Conc" is continous and "Class" is discrete. ggplot correctly draw the graph, but when I use ggplotly(), the plot is almost empty (becomes empty if I put also fill = "Class")
in ggplot works fine:

in plotly doesn't work:

If I reverse x and y everything works fine but the boxplot will be vertical. So in order to make an horizontal boxplot that kinda works in plotly I have to use coord_flip() in ggplot2. So this code:
au2 = ggplot(box_data) + geom_boxplot(aes_string(y = "Conc", x ="Class")) +
labs( x = "log2(Concentration)", title = "Density boxplot") + coord_flip()
plotly::ggplotly(au2)
But I have a last problem with ticks. They are a bit rotated:
problem with ticks in plotly:

What's happening??
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, den gemeldeten horizontalen Boxplot mit ggplot(), geom_boxplot() und plotly::ggplotly() zu reproduzieren, und vergleiche dabei die direkte horizontale Zuordnung mit der coord_flip()-Umgehungslösung. Untersuche die Behandlung kontinuierlicher und diskreter Achsen, von fill und von Tick-Beschriftungen; abgeschlossen ist die Aufgabe, wenn horizontale Boxplots mit fill korrekt gerendert werden und ihre Ticks erwartungsgemäß ausgerichtet sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100