Take a ggplot2 object and return a list containing its title, subtitle, and caption. Recognises Patchwork plots.

extract_labs(p)

Arguments

p

ggplot2 object

Value

list with three elements: title, subtitle, caption