% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api.R
\name{scale_x_continuous}
\alias{scale_x_continuous}
\alias{scale_y_continuous}
\title{Continuous scale for the x axis}
\usage{
scale_x_continuous(
  name = NULL,
  limits = NULL,
  breaks = NULL,
  labels = NULL,
  expand = 0.05,
  trans = "identity"
)

scale_y_continuous(
  name = NULL,
  limits = NULL,
  breaks = NULL,
  labels = NULL,
  expand = 0.05,
  trans = "identity"
)
}
\arguments{
\item{name}{Axis title (defaults to the mapped expression).}

\item{limits}{Optional numeric length-2 domain; \code{NULL} trains from data.}

\item{breaks}{Explicit tick positions in data units, or \code{NULL} for
automatic "nice number" breaks.}

\item{labels}{Tick labels: a character vector the same length as
\code{breaks}, a function applied to the break values (e.g.
\code{function(x) paste0("$", x)}), or \code{NULL} for automatic formatting.}

\item{expand}{Fraction of the data span to pad onto each end of the axis
(default 5\%). Use \code{0} for a tight axis.}

\item{trans}{Axis transform: \code{"identity"}, \code{"log10"}, \code{"sqrt"}, or
\code{"reverse"}.}
}
\value{
A \link{ScaleContinuous} object to add with \code{+}.
}
\description{
Controls the axis title, limits, tick positions, tick labels, the
padding around the data, and the axis transform.
}
\examples{
ggnext(cars, aes(speed, dist)) +
  geom_point() +
  scale_x_continuous(
    name = "Speed (mph)",
    breaks = c(5, 10, 15, 20, 25),
    expand = 0
  ) +
  scale_y_continuous(labels = function(v) paste0(v, " ft"))
}
