% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{ElbowPlot}
\alias{ElbowPlot}
\title{Quickly Pick Relevant Dimensions}
\usage{
ElbowPlot(
  object,
  ndims = 20,
  reduction = "pca",
  plot_type = c("stdev", "variance", "cumulative_variance")
)
}
\arguments{
\item{object}{Seurat object}

\item{ndims}{Number of dimensions to plot (positive integer; capped by stored components)}

\item{reduction}{Reduction technique to plot (default is 'pca')}

\item{plot_type}{One of \code{"stdev"} (default), \code{"variance"} (per-PC \% variance), or
\code{"cumulative_variance"} (running sum of those percentages; equals 100\% at the last
stored PC when \code{ndims} spans all of them)}
}
\value{
A ggplot object
}
\description{
Plots per-component standard deviations (or approximate singular values if running PCAFast),
percent variance explained per principal component, or cumulative percent variance explained,
to help pick an elbow in the graph. This elbow often corresponds well with significant
dimensions and is much faster to run than Jackstraw.
}
\examples{
data("pbmc_small")
ElbowPlot(object = pbmc_small)
ElbowPlot(object = pbmc_small, plot_type = "variance")
ElbowPlot(object = pbmc_small, plot_type = "cumulative_variance")

}
\concept{visualization}
