Eunoia.eunoiaplot
Julia · julia · 1.0.1
Render a fitted EulerFit/VennFit as a publication-ready Makie figure (equal aspect, no axis decorations), returning a Makie.FigureAxisPlot.
The second form draws into a layout cell of an existing figure — e.g. eunoiaplot(f[1, 2], fit) — mirroring Makie's plot(fig[i, j], data). It creates a diagram-configured axis (equal aspect, hidden decorations) in that cell and returns a Makie.AxisPlot. Use it to assemble multi-panel figures without configuring each axis by hand. It takes the same styling keywords (pass an axis title and the like through axis = (; title = "…")) but does not add a legend; add a Legend yourself if you want one.
This requires a Makie backend to be loaded — the implementation lives in a package extension that activates on using CairoMakie (or GLMakie/WGLMakie). The bare Makie plot(fit)/plot!(ax, fit) recipe forms also work once a backend is loaded.
Styling keywords mirror the eunoia-py plot() API:
colors: per-set colors — a vector (shape order) or aDict(name => color); omitted uses a built-in categorical palette. Region fills blend the member colors perceptually (OKLab).fills:Dict(combo => style)per-region fill overrides.edges: set-outline style — a uniform style, a per-setDict, or a vector.labels:false/true/nothing, a per-setDict, or a uniform style.quantities:false/true,"original"/"fitted","counts"/"percent", or aDict.legend:false/trueor aDictofLegendkeywords.complement: container-box styleDict(drawn only when the fit has one).fontsize: base label font size in points (quantities render smaller).
Collision-aware labels:
label_placement:true(default) places labels collision-aware viaplace_labels: each region's label is measured (Makie text metrics), positioned inside its region when it fits, else pushed outside with a leader line. Set names and quantities are combined into one box per region, so a set name and its region quantity never overlap. The default uses the"raycast"exterior solver with straight leaders; pass aNamedTuple/Dictofplace_labelsstrategy knobs (placement,leader,tether,margin,iterations,precision,leader_gap,min_gap) to change it, e.g.label_placement = (; placement = "force_directed")orlabel_placement = (; leader = "elbow", tether = "boundary"). Passlabel_placement=falseto instead draw labels at their raw anchors.leader_style: collection oflines!keywords styling the leader lines.set_label_placement:false(default) keeps set names inside their regions;trueplaces them just outside their own shape, and aNamedTuple/Dictadditionally forwardsmargin,angular_steps,obstacles, andprecisiontoplace_set_labels.glyphs: an explicit region-to-integer-count mapping. Circular glyphs are packed withplace_glyphs; useglyph_optionsfor placement knobs andglyph_stylefor Makiescatter!attributes.members: an explicit region-to-ordered-names mapping. Names are measured, packed withplace_glyph_boxes, and scaled uniformly; usemember_optionsandmember_styleto customize them.glyphsandmembersare mutually exclusive.
Collision-aware placement needs the axis (to convert pixel text metrics to layout units), so it is available through eunoiaplot/eunoiaplot! only; the bare plot(fit) recipe form ignores label_placement.
Methods
eunoiaplot(::AbstractEulerFit, args...; kwargs...)
Source: src/Eunoia.jl
eunoiaplot(
fit::AbstractEulerFit;
figure = (;),
axis = (;),
legend = false,
kwargs...
)
Source: ext/EunoiaMakieExt.jl
eunoiaplot(
gp::Union{Makie.GridPosition, Makie.GridSubposition},
fit::AbstractEulerFit;
axis = (;),
kwargs...
)
Source: ext/EunoiaMakieExt.jl
