u

upsetter

@preview

Render set intersections using UpSet plots

v0.1.0
BSD-2-Clause
1 downloads

Package Information

Last Updated
Authors
goll
Categories
visualization

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/upsetter:0.1.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/upsetter:0.1.0": *

Version History

0.1.0
75a336737c5e...

upsetter

upsetter is a package for rendering UpSet plots,
a way for visualizing intersections between many (> 3) sets.

Features

  • Customizable orientation (vertical or horizontal)
  • Custom set labels
  • Multi-level sorting of intersections

Usage

Here's an example of how to use this package:

#import "@preview/cetz:0.4.2"
#import "@preview/upsetter:0.1.0": plot as upset-plot

#context {
  let plot = upset-plot(
    width: 5,
    orientation: "v",
    (
      "A": 11,
      "B": 3,
      "C": 7,
      "D": 14,
      "A+B": 4,
      "A+C": 6,
      "A+B+C": 3,
      "A+B+C+D": 1
    )
  )

  figure(
    cetz.canvas(plot) + v(1em),
    caption: [UpSet Plot of Intersections Between 4 Sets]
  )
}

The code shown above will generate the following plot:

upsetter example output

For a description of all options available, you can read
the manual.