demo/crosstalk-highlight-subplot.R

library(plotly)

d <- highlight_key(mtcars)
s <- subplot(
  qplot(data = d, x = mpg, y = wt),
  qplot(data = d, x = mpg, y = vs)
)

highlight(s, "plotly_selected")

Try the plotly package in your browser

Any scripts or data that you put into this service are public.

plotly documentation built on Nov. 10, 2022, 5:42 p.m.