% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale.R
\name{xscale}
\alias{xscale}
\title{Apply, invert, or format an x-axis scale}
\usage{
xscale(
  x,
  scale = c("none", "log", "log2", "log10", "scientific"),
  type = c("scale", "inv", "format"),
  format_digits = 1
)
}
\arguments{
\item{x}{Numeric vector to be transformed or formatted.}

\item{scale}{Axis scale. One of \code{"none"}, \code{"log"}, \code{"log2"},
\code{"log10"}, or \code{"scientific"}.}

\item{type}{What to do with \code{x}: \code{"scale"} applies the
transformation, \code{"inv"} inverts it back to the original space, and
\code{"format"} returns formatted character labels.}

\item{format_digits}{Number of digits to keep when \code{type = "format"}.
If an integer is supplied (e.g. \code{1L}) trailing zeros are dropped.}
}
\description{
Helper used by the forest plot to switch between the user-facing axis
scale and the internal numeric scale, and to format tick labels.
}
\keyword{internal}
