ryamy
1
How can I toggle "all traces" on / off in ggplotly() by 1-click ? I would appreciate any comments!!
a <- seq(-10, 10)
data.frame(a=a, name=as.factor(a)) %>%
ggplot(aes(x=a, y=a, color=name)) +
geom_point() -> g
saveWidget(ggplotly(g), './tmp.html')
you need to modify the initial state of the traces using plotly _build or avoiding to use ggplotly and use plotly directly.
ryamy
3
Thanks, I will try plotly_build!