matplotlib-venn
Functions for plotting area-proportional two- and three-way Venn diagrams in matplotlib.
Decision gist · record as of 2026-08-14
Yes, if you already have Matplotlib, NumPy, and SciPy in your environment and need to visualize two- or three-way set overlaps. The package is actively maintained, has no known vulnerabilities, and is widely used (top 15000 on PyPI). High install friction is a minor concern only if you lack the core scientific stack; the MIT license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Matplotlib, NumPy, and SciPy to be installed.
- Cost-based layout for venn3 requires optional Shapely dependency.
- High install friction: the package itself has no runtime dependencies, but Matplotlib, NumPy, and SciPy must be present in your environment.
License · maintenance · safety
MIT (permissive) — MIT license is permissive—you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-02-25 (535 days) · last repo commit 2026-07-03 · 578 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 285,813 downloads/mo, #8,053 on PyPI
Alternatives
Verify before relying
pip install matplotlib-venn
from matplotlib_venn import venn2
venn2(subsets=(3, 2, 1))
# Or with sets:
from matplotlib_venn import venn3
venn3([set(['A', 'B', 'C']), set(['B', 'C', 'D']), set(['C', 'D', 'E'])])- Whether the package works with modern Python versions (requires_python is unspecified in metadata)
- Performance characteristics when handling large subset sizes or complex diagrams
What it is and what it does
matplotlib-venn provides four main functions—venn2, venn2_circles, venn3, and venn3_circles—that render two- and three-circle Venn diagrams with region areas proportional to subset sizes. You pass either a tuple of subset counts or a tuple of set objects, and the package draws colored patches with text labels showing the overlaps. The functions return objects that expose the underlying Matplotlib patches and text elements for further customization.
The package includes two layout algorithms: a default pairwise algorithm that balances the representation of individual set sizes and pairwise intersections, and an optional cost-based algorithm (requiring Shapely) that optimizes circle placement against a user-provided cost function. The description notes that exact area correspondence is not always achievable for three-circle diagrams, and provides tuning options via fixed_subset_sizes and alternative layout algorithms.
Use it for
- Visualize overlaps between two or three datasets (e.g., genes in different experiments, users across platforms)
- Compare membership of sets in scientific or statistical analysis to show intersection sizes at a glance
- Generate publication-ready Venn diagrams with customizable colors, labels, and styling via Matplotlib
- Explore set relationships interactively by tuning layout algorithms and cost functions for better visual clarity
- Embed Venn diagrams in multi-panel figures or dashboards using Matplotlib's subplot and axes API
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you already have Matplotlib, NumPy, and SciPy in your environment and need to visualize two- or three-way set overlaps.
The package is actively maintained, has no known vulnerabilities, and is widely used (top 15000 on PyPI). High install friction is a minor concern only if you lack the core scientific stack; the MIT license poses no restrictions.
Install
matplotlib-venn on PyPI
Before you install
High install friction: the package itself has no runtime dependencies, but Matplotlib, NumPy, and SciPy must be present in your environment. The optional Shapely dependency unlocks an alternative layout algorithm for three-circle diagrams; the description notes Shapely may become required in future versions.
Requires Matplotlib, NumPy, and SciPy to be installed. Cost-based layout for venn3 requires optional Shapely dependency.
License in practice
MIT license is permissive—you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install matplotlib-venn
from matplotlib_venn import venn2
venn2(subsets=(3, 2, 1))
# Or with sets:
from matplotlib_venn import venn3
venn3([set(['A', 'B', 'C']), set(['B', 'C', 'D']), set(['C', 'D', 'E'])])
Verify before relying
- Whether the package works with modern Python versions (requires_python is unspecified in metadata)
- Performance characteristics when handling large subset sizes or complex diagrams
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Actively maintained 535 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 285,813 / month, #8,053 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Visualization |
Evidence: matplotlib-venn-1.1.2.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “venn diagram plotting”
- matplotlib-vennPlots area-weighted two- and three-circle Venn diagrams using…
- UpSetPlotUpSetPlot generates visualizations of set overlaps and intersections…
- eralchemyGenerates Entity Relation (ER) diagrams from SQLAlchemy models or…
Give your agent the search over MCP, or paste the wish link into any chat.
More Visualization packages
matplotlib creates static, animated, and interactive visualizations in Python, producing publication-quality figures in multiple formats for scripts, shells, web servers, and graphical interfaces.
Install it if you need to visualize data, generate publication-quality figures, or embed plots in applications.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Plotly is an interactive, browser-based graphing library that creates charts and visualizations from Python, rendering them as HTML that can be viewed in Jupyter notebooks, standalone files, or web applications.
Generates DOT language source code for graph structures and renders them using the Graphviz graph drawing software installed on your system.
Install it if you need to generate or render graphs from Python.
Streamlit transforms Python scripts into interactive web applications with minimal code, enabling rapid development of data dashboards, reports, and chat interfaces without requiring web development expertise.
Leather is a lightweight Python charting library for quick, no-frills data visualization. It generates charts without requiring perfect styling or extensive configuration.
See also UpSetPlot · descartes · koreanize-matplotlib · plotbin · pygraphviz · diagrams · lovelyplots · torchviz · cmeel-qhull · textual-plotext