% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{violinPlot}
\alias{violinPlot}
\title{Create a violin plot to represent a feature}
\usage{
violinPlot(
  scObj,
  feature = rownames(scObj)[1],
  groupBy = metadataNames(scObj)[1],
  title = feature,
  legendTitle = NULL,
  xLab = "Identity",
  yLab = "Expression level",
  palette = "grDevices::rainbow",
  pointSize = 0.5,
  alpha = 0.8,
  legendPos = c("right", "top", "left", "bottom"),
  legendTextSize = 10,
  legendTitleSize = 10,
  axisTextSize = 12,
  axisTitleSize = 12,
  xLabAngle = 45,
  xLabVjust = 0.5,
  ...
)
}
\arguments{
\item{scObj}{A \code{Seurat} or \code{SingleCellExperiment} object.}

\item{feature}{A gene name or metadata column name.}

\item{groupBy}{Grouping variable. Must exist in the metadata/coldata of
the single-cell expression object.}

\item{title}{Plot title.}

\item{legendTitle}{Legend title.}

\item{xLab}{x axis label.}

\item{yLab}{y axis label.}

\item{palette}{Color palette.}

\item{pointSize}{Point size.}

\item{alpha}{Opaqueness level.}

\item{legendPos}{Legend position.}

\item{legendTextSize}{Legend text size.}

\item{legendTitleSize}{Legend title size.}

\item{axisTextSize}{Axis text size.}

\item{axisTitleSize}{Axis title size.}

\item{xLabAngle}{x axis label angle.}

\item{xLabVjust}{x axis label vertical justification in [0, 1].}

\item{...}{Additional arguments passed to \code{henna::centerTitle}.}
}
\value{
A violin plot.
}
\description{
This function creates a violin plot to represent a
feature (gene expression or numeric metadata column).
}
\examples{
scePath <- system.file('extdata', 'sceObj.qs2', package='scLang')
sceObj <- qs2::qs_read(scePath)
violinPlot(sceObj, 'Gene289')

}
