Skip to contents

Save a list of plots as a PDF, with a grid of nrow by ncol plots per page

Usage

plots_to_pdf(
  list_of_plots,
  save_path,
  nrow = 1,
  ncol = 1,
  width = 8.5,
  height = 11
)

Arguments

list_of_plots

list of plots to save to PDF

save_path

path to which to save the plots

nrow

Number of rows of plots per page (passed to gridExtra::marrangeGrob()) Default 1.

ncol

Number of columns of plots per page (passed to gridExtra::marrangeGrob()). Default 1.

width

page width in device units (passed to ggplot2::ggsave()). Default 8.5.

height

page height in device units (passed to ggplot2::ggsave()). Default 11.

Value

TRUE on success.