% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-dim.R
\name{plotDimDiscretized}
\alias{plotDimDiscretized}
\title{Dimensionality Reduction Plot (Multi-Color, Discretized)}
\usage{
plotDimDiscretized(
  object,
  labels,
  label.types = rep("search", length(labels)),
  label.min = rep(0, length(labels)),
  label.max = rep(Inf, length(labels)),
  colors = c("grey", "blue", "green", "red", "cyan", "magenta", "yellow", "black"),
  reduction.use = c("tsne", "pca", "dm"),
  dim.x = 1,
  dim.y = 2,
  point.size = 1,
  alpha = 1,
  plot.title = NULL,
  x.lim = NULL,
  y.lim = NULL
)
}
\arguments{
\item{object}{An URD object}

\item{labels}{(Character vector, length 1-3) Data to plot}

\item{label.types}{(Character vector, length 1-3) Type of data to search for the label for the first channel. Default is "search" which checks several data types in order. For more information: \code{\link{data.for.plot}}}

\item{label.min}{(Numeric vector, length 1-3) Consider a cell positive for a feature if its value is between \code{label.min} and \code{label.max}}

\item{label.max}{(Numeric vector, length 1-3) Consider a cell positive for a feature if its value is between \code{label.min} and \code{label.max}}

\item{colors}{(Character vector) Colors to use for plotting. Color order is as follows: With one label (A): 1 A-, 2 A+; With two labels (A, B): 1 A- B-, 2 A+ B-, 3 A- B+, 4 A+ B+; With three labels (A, B, C): 1 A- B- C-, 2 A+ B- C-, 3 A- B+ C-, 4 A- B- C+, 5 A+ B+ C-, 6 A+ B- C+, 7 A- B+ C+, 8 A+ B+ C+}

\item{reduction.use}{(Character) Dimensionality reduction to use (tSNE, PCA, or Diffusion Map)}

\item{dim.x}{(Numeric) Component to use on x-axis}

\item{dim.y}{(Numeric) Component to use on y-axis}

\item{point.size}{(Numeric) Size of points on plot}

\item{alpha}{(Numeric) Transparency of points on plot: 0 (Transparent) - 1 (Opaque)}

\item{plot.title}{(Character) Title of the plot}

\item{x.lim}{(Numeric) Limits of x-axis (NULL autodetects)}

\item{y.lim}{(Numeric) Limits of y-axis (NULL autodetects)}
}
\value{
A ggplot2 object
}
\description{
Plots cells according to their coordinates in a dimensionality reduction (tSNE by default).
Cells are colored according to which of 1-3 \code{labels} are 'on' after conversion to 
discrete on/off values according to \code{label.min} and \code{label.max}. 
All labels must be continuous variables (i.e. not cluster identities).
}
\details{
Shamelessly inspired by the behavior of FeaturePlot in Seurat when overlay is turned on.
}
