% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-z.R
\name{zlim}
\alias{zlim}
\title{Set z-axis limits}
\usage{
zlim(min, max, ...)
}
\arguments{
\item{min, max}{The minimum and maximum values for the z-axis.}

\item{...}{Additional arguments passed to \code{scale_z_continuous()}.}
}
\value{
A ggplot2 scale object for the z aesthetic with specified limits.
}
\description{
This is a shorthand for \code{scale_z_continuous(limits = c(min, max))}.
It's a convenient way to set the z-axis limits without specifying other
scale parameters.
}
\examples{
library(ggplot2)

# Set z-axis limits
ggplot(mtcars, aes(mpg, wt, z = qsec)) +
  geom_point() +
  zlim(15, 20) +
  coord_3d()

# Equivalent to:
ggplot(mtcars, aes(mpg, wt, z = qsec)) +
  geom_point() +
  scale_z_continuous(limits = c(15, 20)) +
  coord_3d()

}
\seealso{
\code{\link{scale_z_continuous}} for more control over z-axis scaling,
\code{\link{xlim}}, \code{\link{ylim}} for x and y axis limits

Other 3D scale functions:
\code{\link[=scale_z_continuous]{scale_z_continuous()}},
\code{\link[=scale_z_discrete]{scale_z_discrete()}}
}
\concept{3D scale functions}
