Some error bars are missing when using multi-variable grouping
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
When using group_by and color, some of the error bars seem to disappear.
data <- data.frame(group = rep(c('A','B'), each = 4), id = rep(c(1:4), each = 2), x = runif(8), y = runif(8), ci = runif(8)/4)
data %>%
group_by(id, group) %>%
arrange(x, .by_group = T) %>%
plot_ly( x = ~x, y = ~y,
color = ~group,
type ='scatter',
mode='lines+markers',
error_y = ~list(array=ci, type = 'data')
)
Result: error bars are present on 6 out of 8 points.

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
Run the reproducible R example using group_by(id, group), color = ~group, and error_y = ~list(array=ci, type = 'data'). Trace how grouped data and error bars are handled, then verify that error bars appear on all 8 points rather than only 6.
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
- Mostly clear
- Newbie friendliness
- 48/100