% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/middleware.R
\name{.merge_legend_override}
\alias{.merge_legend_override}
\title{Merge ggplotplus legend-key overrides with an existing guide}
\usage{
.merge_legend_override(plot, aes_name, override_list)
}
\arguments{
\item{plot}{A ggplot object.}

\item{aes_name}{A single character string giving the aesthetic whose guide
should be modified.}

\item{override_list}{A named list of ggplotplus legend-key overrides, such as
\code{list(alpha = 1, size = 5)}.}
}
\value{
A guide object. If no guide exists for \code{aes_name}, returns a new
\code{ggplot2::guide_legend()} using \code{override_list}. If a guide
exists, returns a copy with merged \code{override.aes} values, where
existing user values win over ggplotplus defaults.
}
\description{
Internal helper that merges ggplotplus legend-key defaults with any
user-specified \code{override.aes} values for a guide.
}
\details{
ggplotplus uses this helper to improve legend readability by overriding
non-semantic, hard-to-read, constant \code{alpha} and \code{size} values in
legend keys. Existing user overrides are preserved and take precedence over
ggplotplus defaults for positive UX.
}
\keyword{internal}
