% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/middleware.R
\name{.aes_mapped_var_is_continuous}
\alias{.aes_mapped_var_is_continuous}
\title{Check whether an aesthetic is mapped to a continuous (numeric) variable}
\usage{
.aes_mapped_var_is_continuous(plot, aes_name)
}
\arguments{
\item{plot}{A ggplot object.}

\item{aes_name}{A single character string giving the aesthetic to check.}
}
\value{
A logical scalar. Returns \code{TRUE} if the aesthetic appears to be
mapped to a continuous variable; otherwise returns \code{FALSE}.
}
\description{
Internal helper that determines whether a given aesthetic is mapped to a
continuous variable. Used to guard legend override operations that are
appropriate only for discrete legends (not colorbars), because applying a
\code{guide_legend()} to a continuous scale would suppress the colorbar.
}
\details{
The helper first checks for an explicit continuous scale on the plot. If
none is found, it inspects the mapped expression and looks up the variable
in the plot and layer data to determine whether it's numeric.
}
\keyword{internal}
