View source: R/facet_wrap_paginate.R
| facet_wrap_paginate | R Documentation |
This extension to ggplot2::facet_wrap() will allow you to split
a facetted plot over multiple pages. You define a number of rows and columns
per page as well as the page number to plot, and the function will
automatically only plot the correct panels. Usually this will be put in a
loop to render all pages one by one.
facet_wrap_paginate(
facets,
nrow = NULL,
ncol = NULL,
scales = "fixed",
shrink = TRUE,
labeller = "label_value",
as.table = TRUE,
switch = deprecated(),
drop = TRUE,
dir = "h",
strip.position = "top",
page = 1
)
If either ncol or nrow is NULL this function will
fall back to the standard facet_wrap functionality.
n_pages() to compute the total number of pages in a paginated
faceted plot
Other ggforce facets:
facet_grid_paginate(),
facet_stereo(),
facet_zoom()
ggplot(diamonds) +
geom_point(aes(carat, price), alpha = 0.1) +
facet_wrap_paginate(~ cut:clarity, ncol = 3, nrow = 3, page = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.