knitr::opts_chunk$set(echo = FALSE, fig.width = 16, fig.height=6) library(ggplot2) library(patchwork) library(crssplot) figs <- readRDS(params$figs_file) figs <- figs[[params$pg_name]] side_by_side <- function(p1, p2) { (p1 | p2) + plot_layout(guides = "collect") } add_space <- function(p1) { (plot_spacer() | p1 | plot_spacer()) + plot_layout(widths = c(.15, .7, .15)) }
# [[1]] removes the logos from the plots since those are included on the slides side_by_side(figs$powell_cloud[[1]], figs$mead_cloud[[1]])
side_by_side(figs$p3525, gg_move_y_axis(figs$p3490))
side_by_side(figs$shortage, gg_move_y_axis(figs$surplus))
side_by_side(figs$m1025, gg_move_y_axis(figs$m1000))
add_space(figs$powell_heat[[1]])
add_space(figs$mead_heat[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.