% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aes.R
\name{aes}
\alias{aes}
\title{Aesthetic mapping with positional z support}
\usage{
aes(x, y, z, ...)
}
\arguments{
\item{x}{Variable to map to x aesthetic (required)}

\item{y}{Variable to map to y aesthetic (required)}

\item{z}{Variable to map to z aesthetic (optional)}

\item{...}{Other aesthetic mappings (color, size, etc.)}
}
\value{
An aesthetic mapping object, same as \code{ggplot2::aes()}
}
\description{
This function extends \code{ggplot2::aes()} to support positional mapping
to the z aesthetic. It maintains full backward compatibility with the original
\code{aes()} function while enabling the convenient \code{aes(x, y, z)} syntax
for 3D plots.
}
\details{
This function is a lightweight wrapper around \code{ggplot2::aes()} that:
\itemize{
\item Maintains full backward compatibility with existing 2D plots
\item Enables positional z mapping: \code{aes(x_var, y_var, z_var)}
\item Works with any geom that uses the z aesthetic (contour, raster, 3D plots)
\item Passes through all other aesthetics unchanged
}
}
\examples{
library(ggplot2)

# 2D plots work like regular ggplot2
ggplot(mtcars, aes(mpg, wt)) + geom_point()

# 3D plots can use positional syntax, or explicitly map to z
# same as: ggplot(mtcars, aes(mpg, wt, z = qsec)) + geom_point() + coord_3d()
ggplot(mtcars, aes(mpg, wt, qsec)) + geom_point() + coord_3d()

# Also works with non-ggcube z-aesthetic geoms
ggplot(mountain, aes(x, y, z)) + geom_contour()

}
\seealso{
\code{\link[ggplot2]{aes}} for the original aesthetic mapping function,
\code{\link{coord_3d}} for 3D coordinate systems
}
