d <- SharedData$new(mpg)
dots <- plot_ly(d, color = ~class, x = ~displ, y = ~cyl)
boxs <- plot_ly(d, color = ~class, x = ~class, y = ~cty) %>% add_boxplot()
bars <- plot_ly(d, x = ~class, color = ~class)
subplot(dots, boxs) %>%
subplot(bars, nrows = 2) %>%
layout(
dragmode = "select",
barmode = "overlay",
showlegend = FALSE
)
plotly.js "natively" supports a few statistical graphics (e.g., bar charts, histograms, and boxplots)
Dynamically updating other statistical graphics (e.g., densities, fitted lines, violins, etc) currently requires linking views with shiny