n_pages: Determine the number of pages in a paginated facet plot

View source: R/ggforce-facet-paginate.R

n_pagesR Documentation

Determine the number of pages in a paginated facet plot

Description

This is a simple helper that returns the number of pages it takes to plot all panels when using facet_wrap_paginate . It partially builds the plot so depending on the complexity of your plot it might take some time to calculate...

Usage

n_pages(plot)

Arguments

plot

A ggplot object using either facet_wrap_paginate or facet_grid_paginate

Value

If the plot uses using either facet_wrap_paginate or facet_grid_paginate it returns the total number of pages. Otherwise it returns NULL


ggPMXdevelopment/ggPMX documentation built on Dec. 11, 2023, 5:24 a.m.