suppressPackageStartupMessages(library(metricsgraphics))
suppressPackageStartupMessages(library(htmltools))
suppressPackageStartupMessages(library(dplyr))
plots <- lapply(1:7, function(x) {
  mjs_plot(rnorm(10000, mean=x/2, sd=x), width=300, height=300, linked=TRUE) %>%
    mjs_histogram(bar_margin=2) %>%
    mjs_labs(x_label=sprintf("Plot %d", x))
})

moar_plots <- lapply(1:7, function(x) {
  mjs_plot(rbeta(10000, x, x), width=300, height=300, linked=TRUE) %>%
    mjs_histogram(bar_margin=2) %>%
    mjs_labs(x_label=sprintf("Plot %d", x))
})
mjs_grid(plots)