ggplotly doesn't handle group aesthetic of geom_ribbon
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
When using geom_ribbon with only the group aesthetic, ggplotly seems to simply merge everything. Semitransparent ribbons, which should appear darker in the overlap region, are therefore indistinguishable.
reprex:
x <- 1:10
ymin1 <- x - 1
ymax1 <- x + 1
ymin2 <- x
ymax2 <- x + 2
p <- ggplot(data.frame(group=rep(c(1,2), each=10), x=rep(x, 2), ymin=c(ymin1, ymin2), ymax=c(ymax1, ymax2)), aes(x=x, group=group)) +
geom_ribbon(aes(ymin=ymin, ymax=ymax), alpha=0.5)
p


Created on 2018-09-20 by the reprex package (v0.2.1.9000)
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 with the supplied R reprex and compare the ggplot2 result with the ggplotly result for geom_ribbon using only the group aesthetic. Trace the ggplotly entry point and determine why the two ribbons are merged; done means the semitransparent overlap is visibly darker as in the static plot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100