Search arXiv⌕ Search

arXiv · 2611.02198

Eunoia: Area-Proportional Euler and Venn Diagrams in Rust, Julia, Python, R, and JavaScript

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Johan Larsson, Nicole M. Lee. 2026-11-01. Eunoia: Area-Proportional Euler and Venn Diagrams in Rust, Julia, Python, R, and JavaScript. https://arxiv.org/abs/2611.02198

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Scalable Bayesian inference for time-discretised Markov jump processes via exchangeable particle Gibbs

Inference in stochastic reaction-network models, such as the susceptible-exposed-infectious-recovered (SEIR) epidemic model, is crucial for understanding the dynamics of interacting systems in epidemiology, ecology, and systems biology. These models are typically represented as Markov jump processes (MJPs), with discrete, noisy observations and intractable likelihoods. Particle Markov chain Monte Carlo (PMCMC) offers a natural mechanism for inference on these hidden Markov models, but, even in moderate dimensional state spaces, particle degeneracy typically leads to poor mixing of the PMCMC algorithm. This paper focuses on improving the efficiency of particle Gibbs for inference on reaction networks by addressing the degeneracy problem. Building on recent work on the exchangeable particle Gibbs (xPG) sampler for diffusions, this paper develops a novel version of xPG tailored to discrete-state-space reaction networks, where randomness is driven by Poisson processes rather than Brownian motion. We focus on the $τ$-leap discretisation of the MJPs. The proposed method retains the exchangeability framework of xPG while adapting it to the structural and computational challenges specific to reaction networks. The new method is applied to several examples, including four coupled SEIR models, where it substantially improves mixing efficiency compared with standard particle Gibbs. In this example, xPG improves sample efficiency by more than an order of magnitude relative to standard particle Gibbs, making inference feasible in hours rather than weeks. As part of our tuning strategy, we provide a mechanism for tuning the number of particles that is applicable more generally, to any particle Gibbs algorithm.

stat.CO↗

A new gradient-free active subspace estimation method with application to rare event probability estimation

To reduce the cost of estimating the probability of a rare event involving a very large number of random parameters, we propose a new strategy for dimension reduction coupled with a surrogate model for the expensive part of the algorithm. To this end, we extend the Ordinary Kriging Active Subspace (OK-AS) method into a sequential version. Our approach consists of iteratively re-estimating the active subspace using a Kriging surrogate trained in a rotated coordinate system until the active subspace stabilises. This method allows for a reduction in prediction error and a better approximation of the active subspace on a benchmark of test problems. Furthermore, we integrate our algorithm into an efficient pre-existing approach for estimating the probability of a rare event. This approach is based on learning the active subspace associated with the random event whose probability is to be estimated. The sequential learning of an importance sampling density is necessary and corresponds to the expensive part of this strategy. To circumvent this issue, we integrate our sequential OK-AS version into the estimation of the importance sampling density. The numerical results indicate that our method allows for reducing the cost required to obtain a precise estimate of the rare event probability.

stat.CO↗

Spectral Gap Inheritance for Metropolis-Hastings with Reversible Proposals

We study Metropolis-Hastings kernels whose proposal kernels are reversible with respect to a reference measure, and establish sufficient conditions for such kernels to inherit a nonzero right spectral gap from their proposal kernel. Our conditions require the importance weight of the target relative to the reference measure to be bounded above, but do not require it to be bounded away from zero. Our approach combines a localized Holley-Stroock argument, which yields a local Poincare inequality, with a Lyapunov drift condition. As our main application, we analyze the preconditioned Crank-Nicolson (pCN) algorithm for sampling from measures on a Hilbert space that are absolutely continuous with respect to a Gaussian reference measure. Under local boundedness and quasiconvexity assumptions on the potential, we establish a dimension-independent $L^2$-spectral gap for this Metropolis-Hastings algorithm, thereby covering cases in which the local Lipschitz condition used by Hairer et al. (2014) is not satisfied.

stat.CO↗