Description Usage Arguments Details Value Examples
Given a list of ggplot objects - arrange the plots on a page (with a specified number of plots columns/rows per page) and save as a (multi-page) PDF
1 2 3 4 |
ggplt_list |
List of ggplot objects (list - ggplot). |
ncol_plot |
Number of plot columns on each page of the final PDF (integer) [default: 3]. |
nrow_plot |
Number of plot rows on each page of the final PDF (integer) [default: 3]. |
output_path |
Path where the final PDF is to be saved ("...../") (character). |
output_file |
Namer under which the final PDF is to be saved ("...pdf") (character). |
orientation |
Page orientation of the final PDF (character - "vertical"/"horizontal") [default: "vertical"]. |
share_legend |
Whether or not all plots on a page are to share one legend (logical - TRUE/FALSE) [default: FALSE]. |
quiet |
Whether to print status updates as individual pages are generated (logical - TRUE/FALSE) [default: FALSE]. |
Maintained by: Clara Marquardt
Generate and save a PDF with all plots.
1 2 3 4 5 6 7 8 9 | \{dontrun
plot_1 <- ggplot(data=dia[1:15]) +
geom_bar(aes(x=dia_code)) +
theme_basic()
plot_list <- list(plot_1, plot_1, plot_1, plot_1,plot_1, plot_1, plot_1)
generate_pdf(ggplt_list=plot_list, ncol_plot=3, nrow_plot=2,
output_path="", output_file="merge_pdf_test", orientation="horizontal",
share_legend=FALSE, quiet=FALSE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.