创建动画气泡时,如果选择突出显示,则不会更改大小。
来自
library(plotly)
library(ggplot2)
library(gapminder)
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")
如果选择使用plotly框,则选定的气泡会改变大小,而动画
大小
预期
大小没有更改
不确定是否错误或我是否缺少设置
When creating an animated bubble plot bubbles are not changing size if selected using highlight.
Borrowing code from https://plotly-r.com/client-side-linking.html
library(plotly)
library(ggplot2)
library(gapminder)
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")
If select using plotly box the selected bubbles change size though the animation
expected size
If select using hihlight plotly_click the selected bubbles don't change size in the animation
size hasn't changed
Not sure if a bug or if I'm missing a setting
发布评论