% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visualization.R \name{VlnPlot} \alias{VlnPlot} \title{Single cell violin plot} \usage{ VlnPlot( object, features, cols = NULL, pt.size = NULL, alpha = 1, idents = NULL, sort = FALSE, assay = NULL, group.by = NULL, split.by = NULL, adjust = 1, y.max = NULL, same.y.lims = FALSE, log = FALSE, ncol = NULL, slot = deprecated(), layer = NULL, split.plot = FALSE, stack = FALSE, combine = TRUE, fill.by = "feature", flip = FALSE, add.noise = TRUE, raster = NULL ) } \arguments{ \item{object}{Seurat object} \item{features}{Features to plot (gene expression, metrics, PC scores, anything that can be retreived by FetchData)} \item{cols}{Colors to use for plotting} \item{pt.size}{Point size for points} \item{alpha}{Alpha value for points} \item{idents}{Which classes to include in the plot (default is all)} \item{sort}{Sort identity classes (on the x-axis) by the average expression of the attribute being potted, can also pass 'increasing' or 'decreasing' to change sort direction} \item{assay}{Name of assay to use, defaults to the active assay} \item{group.by}{Group (color) cells in different ways (for example, orig.ident)} \item{split.by}{A factor in object metadata to split the plot by, pass 'ident' to split by cell identity'} \item{adjust}{Adjust parameter for geom_violin} \item{y.max}{Maximum y axis value} \item{same.y.lims}{Set all the y-axis limits to the same values} \item{log}{plot the feature axis on log scale} \item{ncol}{Number of columns if multiple plots are displayed} \item{slot}{Slot to pull expression data from (e.g. "counts" or "data")} \item{layer}{Layer to pull expression data from (e.g. "counts" or "data")} \item{split.plot}{plot each group of the split violin plots by multiple or single violin shapes.} \item{stack}{Horizontally stack plots for each feature} \item{combine}{Combine plots into a single \code{\link[patchwork]{patchwork}ed} ggplot object. If \code{FALSE}, return a list of ggplot} \item{fill.by}{Color violins/ridges based on either 'feature' or 'ident'} \item{flip}{flip plot orientation (identities on x-axis)} \item{add.noise}{determine if adding a small noise for plotting} \item{raster}{Convert points to raster format. Requires 'ggrastr' to be installed.} } \value{ A \code{\link[patchwork]{patchwork}ed} ggplot object if \code{combine = TRUE}; otherwise, a list of ggplot objects } \description{ Draws a violin plot of single cell data (gene expression, metrics, PC scores, etc.) } \examples{ data("pbmc_small") VlnPlot(object = pbmc_small, features = 'PC_1') VlnPlot(object = pbmc_small, features = 'LYZ', split.by = 'groups') } \seealso{ \code{\link{FetchData}} } \concept{visualization}