Quickstart: Julia
Eunoia.jl is the Julia binding. You hand euler a Dict of set sizes, it fits an area-proportional diagram, and eunoiaplot renders it through a Makie extension.
The diagram fitted by the first example below.
Install
using
.
Or, from the Pkg REPL (press ]):
The native fitting engine ships as a Julia artifact, fetched lazily on first use, so no Rust toolchain is needed.
Fit a Diagram
using
=
# `show` prints the residual table
. # fitted Circle, Ellipse, Square, Rectangle, or RotatedRectangle structs
. # fit quality (lower is better)
The Dict is keyed by combination expression: a single set ("A") or sets joined with & ("A&B"). Values are exclusive by default: the part of A outside B is 5, the overlap is 1.5. Pass input_type = "inclusive" if your numbers are full set sizes instead.
Membership collections are accepted too and counted into exclusive regions:
Plot with Makie
Rendering lives in a Makie package extension that loads automatically once you import a Makie backend:
using , # or GLMakie/WGLMakie
=
# publication-ready figure
eunoiaplot(fit) returns a Makie.FigureAxisPlot; eunoiaplot!(ax, fit) draws into an existing axis. Styling keywords (colors, fills, edges, labels, quantities, legend) mirror the other bindings.
Pick a Different Shape
shape is one of "circle" (default), "ellipse", "square", "rectangle", or "rotated_rectangle". Ellipses are more flexible and often fit three or more sets noticeably better. Rotated rectangles add an angle to the width and height and use derivative-free fitting; see Shapes.
Venn Diagrams
For a fixed, non-proportional Venn template (every intersection shown regardless of size), use venn; it accepts an Int, a name vector, or a mapping:
# three sets named A, B, C
Ellipse Venn diagrams support up to five sets, rotated rectangles up to four, and circles, squares, and axis-aligned rectangles up to three.
Next Steps
The full reference lives on the Julia API reference and gallery. For how the fit works across all bindings, see the Fitter Pipeline and Goodness of Fit chapters.
