VISET

← Back to tools

Python library · open source

Most set diagrams tell you how many items overlap, but not which ones. I kept running into this when comparing gene sets, where knowing the actual overlapping genes often mattered more than the counts themselves. That frustration eventually became VISET (Visual Itemized SET diagrams).

Traditional Venn and Euler diagrams quickly become difficult to interpret as the number of sets increases, while UpSet plots trade visual overlap for scalability. Neither solves the problem of showing the actual members within each intersection, which often means switching back and forth between the figure and a separate table.

VISET keeps the familiar Venn, Euler, and UpSet layouts but prints the member names directly inside each region whenever space allows. Instead of asking “How many genes overlap?” you can immediately see which genes they are.

A VISET area-proportional Venn diagram of the drug-target genes for Fluoxetine, Ibuprofen and Acetaminophen, with every gene name printed inside its region

Three drug-target gene sets drawn with VISET. The ellipses are sized to scale and every gene is printed inside the region it belongs to, so you can read the overlaps directly.

Because a region can get dense, every VISET plot also has an interactive version. Hover any region in the diagram below to read its members.

A note on the shapes themselves: Euler diagrams size each region to the number of members it holds, so they represent overlaps more proportionately than a traditional Venn, whose layout stays fixed no matter how many items fall in each region. Either way, once you go past three sets the regions get too cramped and their areas stop being recognisable, so for larger comparisons it’s better to switch to the itemized UpSet plot below, where each intersection bar simply lists the genes it contains. (More on this in the VISET repo.)

A VISET UpSet plot of the same drug-target gene sets, with the genes in each intersection printed inside the corresponding bar

The UpSet view of the same data. Each bar is an intersection, labelled with the genes inside it.

UpSet plots have an interactive version too, with the same hover-to-read behaviour as the Venn above.

The package is written in Python and built with nbdev, making it easy to use both as a library and from notebooks. It supports publication-quality figures, customizable styling, and integrates naturally into existing data analysis workflows.

VISET began as a small utility for my own analyses, but it turned into a general-purpose package that I now use whenever I need to compare sets. Hopefully it makes that process a little easier for other people too.

The code and full documentation live on GitHub.