Learn R Programming

patchwork (version 0.0.1)

wrap_ggplot_grob: Make a gtable created from a ggplot object patchwork compliant

Description

This function converts a gtable, as produced by ggplot2::ggplotGrob() and makes it ready to be added to a patchwork assemble. In contrast to passing the gtable to wrap_elements(), wrap_ggplot_grob() ensures proper alignment as expected. On the other hand major restructuring of the gtable will result in an object that doesn't work properly with wrap_ggplot_grob().

Usage

wrap_ggplot_grob(x)

Arguments

x

A gtable as produced by ggplot2::ggplotGrob()

Value

A table_cell object to be added to a patchwork assemble