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, 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, ecause 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 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

Planned thin wrapper around the Rust core, in its own repository. Track progress on the main repo.

Why Eunoia?

  • Accurate and fast: uses exact n-way intersection geometry, analytical gradients, state-of-the-art optimizers, and is written in Rust.
  • 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.
  • Pluggable 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.