% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/upset.R
\name{upset_plot}
\alias{upset_plot}
\title{upset_plot}
\usage{
upset_plot(
  list,
  nintersects = NULL,
  order.intersect.by = c("size", "name"),
  order.set.by = c("size", "name"),
  color.intersect.by = "none",
  color.set.by = "none",
  remove_empty_intersects = TRUE
)
}
\arguments{
\item{list}{a list of sets}

\item{nintersects}{number of intersects. If NULL, all intersections will show.}

\item{order.intersect.by}{one of 'size' or 'name'}

\item{order.set.by}{one of 'size' or 'name'}

\item{color.intersect.by}{color scheme for 'intersect' bars (e.g., "Set2"), default is "none"}

\item{color.set.by}{color scheme for 'set' bars (e.g., "Set3"), default is "none"}

\item{remove_empty_intersects}{remove the intersects which have zero elements. Default is TRUE.}
}
\value{
an upset plot
}
\description{
Plot a upset plot
}
\details{
This function generate a upset plot by creating a composite plot which contains subplots generated by ggplot2.
}
\examples{
 list = list(A = sample(LETTERS, 20),
             B = sample(LETTERS, 22),
             C = sample(LETTERS, 14),
             D = sample(LETTERS, 30, replace = TRUE))
 upset_plot(list)
 upset_plot(list, remove_empty_intersects = TRUE)
 upset_plot(list, order.intersect.by = "name")
 upset_plot(list, order.set.by = "name")
 upset_plot(list, nintersects = 6)
}
