% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-discrete.R
\name{ScaleDiscrete}
\alias{ScaleDiscrete}
\title{ScaleDiscrete: positional scale for categorical data}
\usage{
ScaleDiscrete(aesthetic = "x", limits = NULL, name = NULL)
}
\arguments{
\item{aesthetic}{\code{"x"} or \code{"y"}.}

\item{limits}{Optional character vector fixing the levels (and their
order); \code{NULL} trains levels from the data.}

\item{name}{Optional axis title.

The \code{levels} property (the trained categories) is filled in during the
plot build, not at construction.}
}
\value{
An S7 object of class \code{ScaleDiscrete}; usually built by \code{\link[=scale_x_discrete]{scale_x_discrete()}} rather than called directly.
}
\description{
Automatically selected when a positional aesthetic maps to character,
factor, or logical data; construct explicitly via \code{\link[=scale_x_discrete]{scale_x_discrete()}} /
\code{\link[=scale_y_discrete]{scale_y_discrete()}} to fix the level order.
}
