% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/middleware.R
\name{.plot_has_mapped_aes}
\alias{.plot_has_mapped_aes}
\title{Check whether a plot maps one or more aesthetics}
\usage{
.plot_has_mapped_aes(plot, aes_name)
}
\arguments{
\item{plot}{A ggplot object.}

\item{aes_name}{A character vector of aesthetic names to check.}
}
\value{
A logical scalar. Returns \code{TRUE} if any requested aesthetic is
mapped in any layer, including through inherited global mappings.
}
\description{
Internal helper that checks whether any layer in a ggplot object maps one
or more requested aesthetics, either directly in the layer mapping or through
inherited plot-level mappings.
}
\details{
This is used before plot building to determine whether an aesthetic such as
\code{alpha} or \code{size} is being mapped explicitly, in which case
ggplotplus should avoid overriding that aesthetic in legend keys.
}
\keyword{internal}
