Eunoia logo

Area-Proportional Euler and Venn Diagrams

A Rust library for fitting set-visualization diagrams with circles, ellipses, squares, and rectangles. Accurate, fast, and shipped with WASM bindings for the web. Powers the R package eulerr, npm package @jolars/eunoia, Julia package Eunoia.jl, and Python package eunoia.

See It in Action

A three-set diagram, fitted in your browser by the same WASM core the packages ship. Drag the region sizes or switch the shape and watch it re-solve live.

Loading the fitter…

Values are exclusive region sizes. Drag any of them and the layout refits live. Try switching the shape; circles can't always represent every overlap, but ellipses usually can.

Install

Rust crates.io
cargo add eunoia

Docs at docs.rs/eunoia.

JavaScript / TypeScript npm
npm install @jolars/eunoia

WASM bindings; powers the web app and all the interactive demos on this site.

R CRAN
install.packages("eulerr")

R users can use eulerr, which is now backed by the same Rust core as Eunoia; docs at jolars.github.io/eulerr.

Python PyPI
pip install eunoia

Bindings to the Rust core with matplotlib plotting; docs at jolars.github.io/eunoia-py.

Julia GitHub
Pkg.add("Eunoia")

Bindings to the Rust core with Makie plotting; docs at jolars.github.io/Eunoia.jl.

Why Eunoia?

  • Accurate and fast: uses exact n-way intersection geometry, analytical gradients, and efficient optimizers.
  • Exact n-way intersection geometry for circles and ellipses.
  • Multiple shapes: circles, ellipses, squares, and rectangles.
  • Multiple loss functions to prioritize different aspects of fit quality.
  • Customizable optimizers (CMA-ES, Levendberg-Marquardt, L-BFGS, Nelder-Mead).
  • Optional bounding-rectangle "complement" for universe sets.
  • Extensive customization of plot aesthetics.
  • Pure Rust core, no platform-specific deps.

Citing Eunoia

If you use Eunoia or any of its derived packages (eulerr in R and `@jolars/eunoia` in npm) in academic work, please cite the paper:

Larsson, J., & Gustafsson, P. (2018). A case study in fitting area-proportional Euler diagrams with ellipses using eulerr. In Proceedings of International Workshop on Set Visualization and Reasoning 2018. https://ceur-ws.org/Vol-2116/paper7.pdf

Other formats (BibTeX, BibLaTeX, CSL, Vancouver, Chicago) are available on the citation page.