UpSetR v1.4.0


Monthly downloads



A More Scalable Alternative to Venn and Euler Diagrams for Visualizing Intersecting Sets

Creates visualizations of intersecting sets using a novel matrix design, along with visualizations of several common set, element and attribute related tasks (Conway 2017) <doi:10.1093/bioinformatics/btx364>.


UpSetR Travis-CI Build Status


UpSetR generates static UpSet plots. The UpSet technique visualizes set intersections in a matrix layout and introduces aggregates based on groupings and queries. The matrix layout enables the effective representation of associated data, such as the number of elements in the aggregates and intersections, as well as additional summary statistics derived from subset or element attributes.

For further details about the original technique see the UpSet website. You can also check out the UpSetR shiny app. Here is the source code for the shiny wrapper.

A Python package called py-upset to create UpSet plots has been created by GitHub user ImSoErgodic.


If you use UpSetR in a paper, please cite:

Jake R Conway, Alexander Lex, Nils Gehlenborg UpSetR: An R Package for the Visualization of Intersecting Sets and their Properties doi:

The original technique and the interactive visualization tool implementing the approach are described here:

Alexander Lex, Nils Gehlenborg, Hendrik Strobelt, Romain Vuillemot, Hanspeter Pfister,
UpSet: Visualization of Intersecting Sets,
IEEE Transactions on Visualization and Computer Graphics (InfoVis '14), vol. 20, no. 12, pp. 1983–1992, 2014.

Sample Data

Sample data sets for UpSetR are included in the package and can be loaded like this:

movies <- read.csv( system.file("extdata", "movies.csv", package = "UpSetR"), header=T, sep=";" )
mutations <- read.csv( system.file("extdata", "mutations.csv", package = "UpSetR"), header=T, sep = ",")

The movie data set created by the GroupLens Lab and curated by Bilal Alsallakh and the mutations data set was originally created by the TCGA Consortium and represents mutations for the 100 most mutated genes in a glioblastoma multiforme cohort.


In addition to the examples shown here, we have included a range of UpSetR plots in the paper about the R package, which can be found in a separate GitHub repository.


There are currently four vignettes that explain how to use the features included in the UpSetR package:


A view of the UpSet plot with additional plots based on elements in the intersections.


upset(movies,attribute.plots=list(gridrows=60,plots=list(list(plot=scatter_plot, x="ReleaseDate", y="AvgRating"),
list(plot=scatter_plot, x="ReleaseDate", y="Watches"),list(plot=scatter_plot, x="Watches", y="AvgRating"),
list(plot=histogram, x="ReleaseDate")), ncols = 2))

A view of UpSetR mimicking the plot published by Lex & Gehlenborg


upset(mutations, sets = c("PTEN", "TP53", "EGFR", "PIK3R1", "RB1"), = "#56B4E9", = "freq", empty.intersections = "on")

An example using two set queries (war movies and noir movies) along with attribute plots comparing the average rating (top) and average rating vs the number of times the movies have been watched (bottom).


upset(movies, attribute.plots=list(gridrows = 100, ncols = 1, 
plots = list(list(plot=histogram, x="AvgRating",queries=T),
list(plot = scatter_plot, y = "AvgRating", x = "Watches", queries = T))), 
sets = c("Action", "Adventure", "Children", "War", "Noir"),
queries = list(list(query = intersects, params = list("War"), active = T),
list(query = intersects, params = list("Noir"))))


Install the latest released version from CRAN


Download the latest development code of UpSetR from GitHub using devtools with


Functions in UpSetR

Name Description
elements Element query for queries parameter
fromExpression Expression to UpSetR converters
histogram Histogram for custom plot
fromList List of named vectors to UpSetR converter
intersects Intersection query for queries parameter
scatter_plot Scatterplot for customplot
upset UpSetR Plot
No Results!

Vignettes of UpSetR

No Results!

Last month downloads


Date 2019-5-9
License MIT + file LICENSE
LazyData true
VignetteBuilder knitr
RoxygenNote 6.1.0
NeedsCompilation no
Packaged 2019-05-09 16:34:50 UTC; jakeconway
Repository CRAN
Date/Publication 2019-05-22 23:30:03 UTC

Include our badge in your README