% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_ermod.R
\name{combine_er_components}
\alias{combine_er_components}
\title{Combine ER plot components}
\usage{
combine_er_components(
  components,
  heights = NULL,
  add_caption = !is.null(components$caption),
  ...
)
}
\arguments{
\item{components}{An object of class \code{er_plot_components} returned by
\code{plot_er()} or \code{plot_er_gof()} with \code{return_components = TRUE} or
\code{options_orig_data = list(return_components = TRUE)}.}

\item{heights}{Numeric vector of length 2 specifying the relative heights
of the main plot and boxplot. If \code{NULL} (default), uses the height from
the metadata (based on \code{boxplot_height} parameter).}

\item{add_caption}{Logical, whether to add the caption to the combined plot.
Default is \code{TRUE} if caption is available.}

\item{...}{Additional arguments passed to \code{patchwork::wrap_plots()}.}
}
\value{
A combined ggplot object.
}
\description{
Combine ER plot components
}
\examples{
\dontrun{
# Get components
comps <- plot_er_gof(ermod_bin, return_components = TRUE)

# Modify components
comps$main <- comps$main + labs(title = "Custom Title")

# Recombine
combine_er_components(comps)
}
}
