% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type_jitter.R
\name{type_jitter}
\alias{type_jitter}
\title{Jittered points plot type}
\usage{
type_jitter(factor = 1, amount = NULL)
}
\arguments{
\item{factor}{numeric; used in calculation of \code{amount} when
   the provided \code{amount} is 0 or \code{NULL}.}

\item{amount}{number or \code{NULL}; when positive, specifies
    the amount of jitter; see Details, also for other cases.}
}
\description{
Type function for plotting jittered points.
Arguments are passed to \code{\link[base]{jitter}}.
}
\details{
The result of \code{r <-  x + amount * runif(n, -1, 1)}
  where \code{n <- length(x)}.

  When \code{amount} is \code{NULL} (the default)
  \code{amount <- factor * d/5} where \emph{d} is about the smallest
  difference between adjacent unique (up to fuzz) \code{x} values.

  If \code{amount == 0}, \code{amount <- factor * (max(x) - min(x))/50},
  (using only finite \code{x} values), which is the same as in S and the
  references.
  In the above cases, the final \code{amount} is always ensured to be positive.

  The short \code{jitter()} function is itself a succinct definition.
}
\examples{
# "jitter" type convenience string
tinyplot(Sepal.Length ~ Species, data = iris, type = "jitter")

# Use `type_jitter()` to pass extra arguments for customization
tinyplot(Sepal.Length ~ Species, data = iris, type = type_jitter(factor = 0.5))
}
