Animated bubble plot - bubble not resizing when selection made via highlight
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
When creating an animated bubble plot the bubbles in the selection set (made through highlight - plotly_click) do not resize.
Example below is based on example from here https://plotly-r.com/client-side-linking.html
library(plotly)
library(ggplot2)
library(gapminder)
#modify some pop values to make bubbles stand out more
gapminder$pop = ifelse(gapminder$year > 1982 & gapminder$country =='China', gapminder$pop * 10, gapminder$pop)
g <- highlight_key(gapminder, ~continent)
gg <- ggplot(g, aes(gdpPercap, lifeExp,
color = continent, frame = year)) +
geom_point(aes(size = pop, ids = country)) +
scale_x_log10()
p_gg <- highlight(ggplotly(gg), "plotly_click")
p_gg
Selecting by clicking on the bubble Not resizing

Expected results
Using Plotly box selection As expected

With no selection

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
The reproducible example uses highlight_key(), ggplot(), ggplotly(), and highlight(..., "plotly_click"); begin by running it and comparing click selection with box selection. Done means selected bubbles resize consistently in the animated plot while the unselected view and existing box-selection behavior remain unchanged.
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
- 38/100