gg_GetPlotLayout: Get the layout dataframe from a ggplot2 or gtable object

View source: R/gg_GetPlotLayout.R

gg_GetPlotLayoutR Documentation

Get the layout dataframe from a ggplot2 or gtable object

Description

Function to get the layout dataframe from a ggplot2 or gtable object.

Usage

gg_GetPlotLayout(p, keepAll = TRUE, verbose = 0)

Arguments

p
  • ggplot2 or gtable object

keepAll
  • flag (T/F) to keep all grobs (including grobs with physical size 0)

verbose
  • flag (T/F) to print intermediate information

Details

This function adds information to a layout regarding how grobs are assigned to rows and columns in a ggplot2 (gtable) layout. It adds coordinates to allow plotting grobs as rectangles by row/column coordinates.

Value

returns a dataframe with columns reflecting the row/column locations and extents of the input ggplot2 or gtable object.

Author(s)

William Stockhausen (william.stockhausen@noaa.gov)


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.