Eunoia: Area-Proportional Euler and Venn Diagrams in Rust, Julia, Python, R, and JavaScript
Johan Larsson, Nicole M. Lee
Abstract
Area-proportional Euler diagrams visualize sets and their intersections through regions whose areas represent their sizes. Because many set specifications have no exact geometric representation, constructing these diagrams requires numerical optimization and diagnostics that quantify the remaining discrepancies. Eunoia is a Rust library for fitting area-proportional Euler diagrams and constructing canonical Venn diagrams. It supports circles, ellipses, squares, and rectangles, computes region areas analytically, and provides exact analytical gradients for several shape families. Its fitting pipeline combines multidimensional scaling initialization with local refinement, global optimization when needed, and seeded restarts. Fitted layouts include residuals and goodness-of-fit statistics that help users assess how faithfully a diagram represents the data. Shared plotting routines extract region polygons, place labels, and pack unit glyphs and member names within regions. The same core implementation powers packages for R, Python, Julia, and JavaScript, a C interface, and a web application that fits diagrams entirely in the browser through WebAssembly. By centralizing fitting, geometry, diagnostics, and annotation in an independent library, Eunoia provides consistent set visualization across programming languages and interactive applications.
Create a lesson
Related papers
BEAGLE in Action: Phylogenetic Likelihoods for Very Large State Spaces
Benjamin D Redelings, April Wright, Karthik Gangavarapu et al.
Fast nonparametric estimation of sparse precision matrices with a priori sparsity structure
Caleb Derrickson, Alexis Montoison, Vishwas Rao et al.
bacontrees: An extensible framework for Bayesian Context Trees in R
Victor Freguglia, Thiago Paulichen
Interval-valued circular time series: A cylindrical score-driven approach with an application to wind direction
Thasmika Mohan, Najmeh Nakhaei Rad, Sphiwe Skhosana et al.
Subgradient Methods for Nonsmooth Sample Average Approximation
Xi Chen, Ouqi Fu, Jiyuan Tu et al.
Spectral Gap Inheritance for Metropolis-Hastings with Reversible Proposals
Minhyeok Kim, Vinayak Rao