Skip to content
jolarsPublic

About

Euler and Venn Diagrams in Python

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

Eunoia

CI pypi DOI

Python bindings for the Eunoia, a Rust library for fitting area-proportional Euler and Venn diagrams. Sister package to the R package eulerr.

Euler circles, ellipses, and a Venn diagram fitted with Eunoia

Install

pip install eunoia

Quickstart

import eunoia as eu
import matplotlib.pyplot as plt

# Disjoint (per-region) input is the default.
fit = eu.euler({"A": 10, "B": 5, "A&B": 3})
print(fit)
# EulerFit (2 circles, diag_error=2.776e-17, stress=5.887e-33, loss=5.887e-33)
#                  original      fitted    residual regionError
#   A                    10          10           0           0
#   B                     5           5           0           0
#   A&B                   3           3   8.882e-16   2.776e-17

fit.plot()
plt.show()

euler() also accepts inclusive counts, DataFrames, and NumPy arrays; shape= switches between circles, ellipses, squares, and rectangles; venn() draws topological diagrams; plot(glyphs=True) adds one countable dot per unit; plot(members={"mode": "packed"}) packs retained member names into their regions; and eunoia.options(...) sets global plotting defaults. See the documentation for the full API.

Documentation

Full documentation, including narrative guides and the API reference, lives at jolars.github.io/eunoia-py.

Ecosystem

This package is the Python member of the Eunoia family. The same Rust core powers bindings in several other languages:

Language Package Install
Rust eunoia (repo) cargo add eunoia
JavaScript @jolars/eunoia (repo) npm install @jolars/eunoia
Julia Eunoia.jl (repo) ] add Eunoia
R eulerr (repo) install.packages("eulerr")

Documentation for the whole family lives at eunoia.bz/docs/; the Rust API reference is at docs.rs/eunoia.

Citation

If you use Eunoia for Python in your research, please cite the paper:

Larsson, J., & Lee, N. M. (2026). Eunoia: Area-Proportional Euler and Venn Diagrams in Rust, Julia, Python, R, and JavaScript (arXiv:2611.02198). arXiv. https://doi.org/10.48550/arXiv.2611.02198

@misc{larsson2026f,
  title         = {Eunoia: {{Area}}-Proportional {{Euler}} and {{Venn}} Diagrams in {{Rust}}, {{Julia}}, {{Python}}, {{R}}, and {{JavaScript}}},
  shorttitle    = {Eunoia},
  author        = {Larsson, Johan and Lee, Nicole M.},
  year          = {2026},
  month         = nov,
  number        = {arXiv:2611.02198},
  eprint        = {2611.02198},
  primaryclass  = {stat.CO},
  publisher     = {arXiv},
  doi           = {10.48550/arXiv.2611.02198},
  archiveprefix = {arXiv}
}
BibLaTeX
@online{larsson2026f,
  title       = {Eunoia: {{Area}}-Proportional {{Euler}} and {{Venn}} Diagrams in {{Rust}}, {{Julia}}, {{Python}}, {{R}}, and {{JavaScript}}},
  shorttitle  = {Eunoia},
  author      = {Larsson, Johan and Lee, Nicole M.},
  date        = {2026-11-01},
  eprint      = {2611.02198},
  eprinttype  = {arXiv},
  eprintclass = {stat.CO},
  doi         = {10.48550/arXiv.2611.02198},
  pubstate    = {prepublished}
}

For reproducibility, also cite the software release you used. Select that release in the Zenodo archive and export its citation. The concept DOI 10.5281/zenodo.20650005 identifies Eunoia for Python across all releases.

CITATION.cff contains the software metadata and preferred paper citation. The Eunoia citation page renders the paper in APA, BibTeX, BibLaTeX, and other formats.

License

MIT

About

Euler and Venn Diagrams in Python

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages