Requirements & Acknowledgements

Install VISET, load your sets, and credit the projects it builds on.

Install

pip install viset

VISET requires Python ≥ 3.9 and these packages, all installed automatically by pip:

Package Used for
eunoia area-proportional Euler layouts (ellipses/boxes)
upsetplot UpSet intersection layout
matplotlib static rendering + font auto-fit
plotly interactive (hover) rendering
pandas, numpy, scipy data handling + region geometry

Version note: upsetplot 0.9.0 (the current release) is not yet compatible with pandas ≥ 3, so VISET pins pandas < 3.

Loading your sets

The Venn plotters take a list of one-column DataFrames, one per set. load builds each one from a CSV column: it reads the column, drops blanks, and names the set. The UpSet plotters instead take a plain {name: [members]} dictionary, which you can build with pandas directly.


source

load

def load(
    path, col, label
):

Read col from the CSV at path, drop NaNs, and return a one-column DataFrame named label.

Code
from viset import load
db = ("Drug target sample files/" if __import__("os").path.isdir("Drug target sample files") else "../Drug target sample files/")
flu = load(db + "1. FLUOXETINE_sample.csv", "Gene names", "Fluoxetine")
flu.head()
Fluoxetine
0 AANAT
1 ACE
2 ATXN2
3 CRHR1
4 CYP1A2

That single-column frame is what every Venn plotter expects; for UpSet, call .iloc[:, 0].tolist() (or pd.read_csv(...)[col].dropna().tolist()) to get a plain member list. With your sets loaded, head to a plotter: Venn (static), Venn (interactive), UpSet (static), or UpSet (interactive).

Acknowledgements

VISET stands on the shoulders of several projects, with thanks to their authors:

  • eunoia (Johan Larsson) is the area-proportional set-fitting engine VISET is built on — it computes the Euler layouts (ellipses, boxes) and region geometry that VISET labels and renders. eunoia is the Python successor to Larsson’s R package eulerr. Both are MIT-licensed.
  • UpSet (Lex, Gehlenborg, Strobelt, Vuillemin & Pfister, IEEE TVCG, 2014) is the intersection-visualization technique behind the UpSet plots, and the upsetplot package (Joel Nothman) provides the layout VISET restyles and itemizes.
  • matplotlib-set-diagrams (Paul Brodersen) is related prior art: it also draws area-proportional Euler diagrams and labels members, as word clouds. VISET’s clean auto-fit member lists and its UpSet itemization were developed independently, but the project is well worth knowing for anyone working in this space.
  • Data: The drug-target gene sets used throughout these docs come from Enrichr (Chen et al. 2013; Kuleshov et al. 2016), specifically the DGIdb Drug Targets 2024 library. They are included only as a small public example.
  • Development: Parts of VISET’s code and documentation were written with the help of Anthropic’s Claude (Claude Code).

License & citation

VISET is released under the MIT License. As it is a thin visualization layer, please cite the layout engine it depends on:

  • Larsson J. eunoia / eulerr: Area-Proportional Euler and Venn Diagrams with Ellipses. https://github.com/jolars/eunoia, https://github.com/jolars/eulerr
  • Lex A, Gehlenborg N, Strobelt H, Vuillemin R, Pfister H. UpSet: Visualization of Intersecting Sets. IEEE Transactions on Visualization and Computer Graphics 20(12):1983–1992, 2014.