ggplotly removes error bars
Open
Nobody has claimed this yet.
bug
ggplotly
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ggplotly(p) entry point and run the reprex from the issue with the colour aesthetic and geom_errorbar layers. Done means the plotly output retains the error bars when colour is mapped to col, matching the ggplot version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100