Learn R Programming

cowplot (version 0.9.2)

get_panel: Retrieve the panel of a plot

Description

This function extracts just the main panel from a ggplot. It only works for plots with exactly one panel (i.e., plots that are not faceted).

Usage

get_panel(plot)

Arguments

plot

A ggplot or gtable from which to retrieve the panel

Value

A gtable object holding just the panel