ArticleslgStudy

mathematics

UpSet plot

UpSet plot is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand UpSet plot rather than just read about it. In short: UpSet plots are a data visualization method for showing set data with more than three intersecting sets. UpSet shows intersections in a matrix, with the rows of the matrix corresponding to the sets, and the columns to the intersections between these sets (or vice versa).

UpSet plot — main illustration
UpSet plot — illustration

Key takeaways

  • UpSet plot belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect UpSet plot to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of UpSet plot from memory before moving on to harder problems.

Reference excerpt

UpSet plots are a data visualization method for showing set data with more than three intersecting sets. UpSet shows intersections in a matrix, with the rows of the matrix corresponding to the sets, and the columns to the intersections between these sets (or vice versa). The size of the sets and of the intersections are shown as bar charts.

History UpSet plots were first proposed in 2014. The first prototype was implemented as an interactive, web-based application. UpSet plots are related to mosaic plots, although mosaic plots are designed for categorical instead of set data. UpSet plots became popular as they became available as an R-library based on ggplot2, and were subsequently re-implemented in various programming languages, such as Python, and others. As of January 2024, UpSetR has been downloaded from CRAN more than 1.5 million times, although it was last updated 7 years ago. UpSet plots are now frequently used instead of Venn diagrams, especially in life sciences.

Usage

UpSet plots visualize intersections between sets in a matrix. In a vertical UpSet plot, the columns of the matrix correspond to the sets, the rows correspond to the intersections. For each row, the cells that are part of an intersection are filled in. If there are multiple filled-in cells, they are connected with a line, to emphasize the reading direction of the plot. As sets vary in size, the size of the set is plotted as bar charts on top of the columns. The size of the intersections are shown aligned with the rows, also as bar charts. This layout facilitates the comparison between the sizes of individual intersections, as the size of the bars is easy to compare. UpSets can be used horizontally and vertically. UpSet plots can be sorted in various ways. A common sorting approach, for example, is to sort by cardinality (the size of an intersection), which places the biggest intersections on top. Alternative sortings are by the degree of the intersection, or by sets. UpSet plots can also be used to visualize attributes about the intersections by placing attribute visualizations next to the bar charts. Common choices for these attribute visualizations are compact visualization approaches for distributions, such as box plots, or violin plots. Advanced features of UpSet plots include querying, grouping and aggregating data. These features tend to be available only in interactive, web-based implementations of UpSet.

Benefits and limitations UpSet plots tend to perform better than Venn diagrams for larger numbers of sets and when it is desirable to also show contextual information about the set intersections. For visualizing diagrams with less than three sets, or when there are only few intersections, Venn and Euler diagrams are generally preferred, because they tend to be more familiar and intuitive to read. UpSet plots are limited to displaying 20-30 sets, though specifics depends on the actual data. An alternative approach for larger datasets is to show a co-occurrence heat map, though these cannot show higher-order intersections

References

Illustrations

UpSet plot: An UpSet Plot showing how movie genres intersect. The largest intersection of two sets is the Comedy-Drama intersection.
An UpSet Plot showing how movie genres intersect. The largest intersection of two sets is the Comedy-Drama intersection.
UpSet plot: Illustration showing how the rows of an UpSet plot correspond to the segments of a Venn diagram.
Illustration showing how the rows of an UpSet plot correspond to the segments of a Venn diagram.
UpSet plot: An UpSet plot showing three sets, and the corresponding venn diagram.
An UpSet plot showing three sets, and the corresponding venn diagram.

Worked examples

Example 1 — a first encounter with UpSet plot

Start with the simplest possible case. Write down what UpSet plot claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to UpSet plot before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about UpSet plot ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of UpSet plot

In research
UpSet plot appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses UpSet plot in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
UpSet plot is common in secondary-school and first-year university syllabi. It links to neighbouring topics Statistical charts and diagrams, so understanding it makes those chapters shorter.
In everyday life
Look for UpSet plot outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study UpSet plot in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what UpSet plot means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain UpSet plot out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is UpSet plot in simple terms?

UpSet plots are a data visualization method for showing set data with more than three intersecting sets. UpSet shows intersections in a matrix, with the rows of the matrix corresponding to the sets, and the columns to the intersections between these sets (or vice versa).

Why does UpSet plot matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study UpSet plot?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on UpSet plot.

Tags

  • Statistical charts and diagrams

Keep exploring