# NOT RUN {
if(!requireNamespace("pkgdown", quietly = TRUE) || !pkgdown::in_pkgdown()) {
# will generate files in a temporary directory
if (requireNamespace("ggplot2")) {
dist <- ggplot2::qplot(stats::rbeta(200, 3, 4))
enlarge_plot(dist,
large_plot = dist + ggplot2::theme_classic(base_size = 18))
} else {
graphics::hist(stats::rbeta(200, 3, 4))
dist <- grDevices::recordPlot()
enlarge_plot(dist)
}
}
# }
Run the code above in your browser using DataLab