Beautiful UpSet plots. Straight from your DataFrame.
Turn overlapping groups into a picture you can understand, customize, and share.
Get started · Try the notebook · Step-by-step guide · Share an idea
Which customers use both web and mobile? Which genes appear across conditions? How do your research cohorts overlap?
PyUpSet puts set sizes, exact intersections, and percentages in one clear chart — using the pandas and matplotlib workflow you already know.
- DataFrame in, chart out. Pass your membership columns and start exploring.
- Readable by default. Aligned panels, degree colors, counts, and percentages.
- Make it yours. Standard matplotlib objects, custom colors, and PNG or PDF export.
- Keep your data local. Runs in Python or Jupyter on your own machine.
Requires Python 3.10 or newer.
pip install "git+https://github.com/Up1ng/pyupset.git@v0.1.0"import pandas as pd
import matplotlib.pyplot as plt
import pyupset
customers = pd.DataFrame({
"Web": [1, 1, 1, 0, 1, 0],
"Mobile": [1, 0, 1, 1, 0, 1],
"Email": [1, 1, 0, 1, 0, 0],
"Paid": [1, 0, 1, 0, 0, 1],
})
fig, axes = pyupset.plot(customers, sets=list(customers.columns), sort_by="size")
plt.show()Use 0/1 or True/False columns: one row per observation, one column per group.
Sort by intersection size with sort_by="size", or by the number of groups with
sort_by="degree". Adjust the chart with familiar matplotlib commands:
axes["intersections"].set_xlabel("Customers")
fig.savefig("customer-overlap.png", dpi=300, bbox_inches="tight")
fig.savefig("customer-overlap.pdf", bbox_inches="tight")Follow the step-by-step guide, explore the full reference, or open the quickstart notebook.
PyUpSet is open source and at the beginning of its journey. Have a dataset, a use case, or an idea for a better chart? Open an issue — we'd like to hear it.
Star the repository to follow the project. Contributions are welcome: here's how to get involved.
Built with pandas, NumPy & matplotlib. Released under the MIT license.
