Save a ggplot2 or Base R plot as a standalone HTML file with interactive MAIDR accessibility features.
Examples
# ggplot2 example
library(ggplot2)
p <- ggplot(mtcars, aes(x = factor(cyl), y = mpg)) +
geom_bar(stat = "identity")
if (FALSE) { # \dontrun{
maidr::save_html(p, "myplot.html")
} # }
# Base R example
if (FALSE) { # \dontrun{
barplot(c(10, 20, 30), names.arg = c("A", "B", "C"))
maidr::save_html(file = "barplot.html")
} # }