% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_titles.R
\name{get_title}
\alias{get_title}
\alias{get_subtitle}
\title{Get plot titles}
\usage{
get_title(plot)

get_subtitle(plot)
}
\arguments{
\item{plot}{A ggplot or gtable.}
}
\description{
These functions extract just the titles from a ggplot. \code{get_title()} pulls
the title, while \code{get_subtitle()} pulls the subtitle.
}
\examples{
library(ggplot2)

p <- ggplot(mpg, aes(displ, cty)) +
  geom_point() +
  labs(
    title = "Plot title",
    subtitle = "Plot subtitle"
  )
ggdraw(get_title(p))
ggdraw(get_subtitle(p))

}
