fig_scale | R Documentation |
Finds the dimensions of the largest figs, and adds a border of the given colour around the other figs, to ensure they are all of the same dimensions and scale properly when displayed on in a patchwork together.
fig_scale(..., border_colour = "transparent")
... |
Multiple figs created with |
border_colour |
Colour of the border to be added around the smaller figs. |
A list of figs which have been resized, which can be input directly
into fig_wrap()
or patchwork::wrap_plots()
.
library(figpatch)
fl <- image_path <- system.file("extdata",
package = "figpatch",
mustWork = TRUE
) %>%
list.files(
pattern = "png",
full.names = TRUE
)
# without scaling
fl %>%
lapply(fig) %>%
fig_wrap(ncol = 2)
# with scaling
fl %>%
lapply(fig) %>%
fig_scale() %>%
fig_wrap(ncol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.