Redundant legend entries in facetted animations
Open
Nobody has claimed this yet.
bug
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
MRE of a problem pointed out in #919
p <- ggplot(mtcars, aes(mpg, wt, color = factor(am))) +
# works fine without frame
#geom_point() +
geom_point(aes(frame = factor(vs))) +
facet_wrap(~cyl)
ggplotly(p)
This also seems to be a problem for the non-ggplot2 approach:
library(dplyr)
mtcars %>%
group_by(cyl) %>%
do(
p = plot_ly(., x = ~mpg, y = ~wt, color = ~factor(am), legendgroup = ~factor(am), frame = ~factor(vs))
) %>%
subplot()
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 by running the supplied ggplotly and non-ggplot2 MREs to reproduce the duplicate legend entries in facetted animations. Trace the legend handling for facets, colors, legendgroup, and frames, then verify that both examples produce non-redundant legends without breaking their animation or subplot behavior.
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
- 45/100