ggplotly removes error bars
Offen
Dieses Issue hat noch niemand übernommen.
bug
ggplotly
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
Thanks for producing this great package. I think I've found a bug that occurs when trying to get ggplotly to produce error bars. The bug occurs when you try to set a colour aesthetic, at which point ggplotly removes the error bars. A reprex is below:
library(ggplot2)
library(plotly)
## create data set
data <- data.frame(
x = rep(paste0("G", 1:2), each = 2),
col = rep(paste0("T", 1:2), 2),
mn = 1:4,
LCI = 1:4 - 0.5,
UCI = 1:4 + 0.5
)
## ggplot version (has error bars)
p <- ggplot(data, aes(x = x, colour = col)) +
geom_point(aes(y = mn)) +
geom_errorbar(aes(ymin = LCI, ymax = UCI))
## plotly version (removes error bars)
ggplotly(p)
Many thanks,
TJ
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
Beginnen Sie am Einstiegspunkt ggplotly(p) und führen Sie das Reprex aus dem Issue mit der colour-Ästhetik und den geom_errorbar-Layern aus. Erledigt ist die Aufgabe, wenn die plotly-Ausgabe die Fehlerbalken beibehält, sobald colour auf col abgebildet wird, und damit der ggplot-Version entspricht.
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