Liking cljdoc? Tell your friends :D

scicloj.plotje.impl.plan

Draft-to-plan pipeline: domains, ticks, legends, layout, and grid inference. Takes draft maps (from pose/leaf->draft) and produces a Plan record with all geometry needed for rendering.

Draft-to-plan pipeline: domains, ticks, legends, layout, and grid inference.
Takes draft maps (from pose/leaf->draft) and produces a Plan record
with all geometry needed for rendering.
raw docstring

collect-domainclj

(collect-domain stat-results axis-key scale-spec)

Collect and merge domains from stat results along axis-key. Throws if some stat results contribute numeric domains and others contribute categorical domains -- mixing the two on one axis is ambiguous.

Collect and merge domains from stat results along axis-key.
Throws if some stat results contribute numeric domains and others
contribute categorical domains -- mixing the two on one axis is
ambiguous.
sourceraw docstring

compute-global-y-domainclj

(compute-global-y-domain plan-layers scale-spec)

Compute global y-domain from position-adjusted layers. Reads pre-computed :y0/:y1 from stacked layers. Extends domain to include 0 for marks that draw from baseline (area, lollipop, value-bar). Clamps the lower bound to 0 for these marks so padding doesn't extend below the baseline.

Compute global y-domain from position-adjusted layers.
Reads pre-computed :y0/:y1 from stacked layers. Extends domain to
include 0 for marks that draw from baseline (area, lollipop, value-bar).
Clamps the lower bound to 0 for these marks so padding doesn't extend
below the baseline.
sourceraw docstring

compute-ticksclj

(compute-ticks domain pixel-range scale-spec spacing)
(compute-ticks domain pixel-range scale-spec spacing temporal-extent)

Compute tick values and labels for a domain+pixel range, using wadogo transiently. When temporal-extent is provided (a [min max] pair of temporal objects), uses wadogo :datetime scale for calendar-aware ticks and formatting. When scale-spec contains :breaks (a vector of numbers), those exact values are used as ticks instead of the auto-computed ones -- ggplot2's scale_*_continuous(breaks = ...) equivalent.

Compute tick values and labels for a domain+pixel range, using wadogo transiently.
When temporal-extent is provided (a [min max] pair of temporal objects),
uses wadogo :datetime scale for calendar-aware ticks and formatting.
When `scale-spec` contains `:breaks` (a vector of numbers), those
exact values are used as ticks instead of the auto-computed ones
-- ggplot2's `scale_*_continuous(breaks = ...)` equivalent.
sourceraw docstring

draft->planclj

(draft->plan draft)
(draft->plan draft
             {:keys [x-label y-label title subtitle caption scales
                     legend-position grid-cols grid-rows]
              :as opts})

Pipeline: convert a draft into a plan using panel-based grid layout. Grid position from structural columns.

New layout pipeline (2026-04-11): stats first, then scene → padding → dimensions, then per-panel ticks at the now-known panel dimensions. :width/:height are total SVG dimensions; panel dimensions are derived by subtracting layout overhead. :panel-width/:panel-height in opts are escape hatches that pin panel size on their axis.

Pipeline: convert a draft into a plan using panel-based grid layout.
Grid position from structural columns.

New layout pipeline (2026-04-11): stats first, then scene → padding →
dimensions, then per-panel ticks at the now-known panel dimensions.
`:width`/`:height` are total SVG dimensions; panel dimensions are
derived by subtracting layout overhead. `:panel-width`/`:panel-height`
in opts are escape hatches that pin panel size on their axis.
sourceraw docstring

resolve-panel-draft-layersclj

(resolve-panel-draft-layers panel-draft-layers
                            all-colors
                            cfg
                            &
                            {:keys [resolved]})

Resolve draft layers and compute stats for a group of draft layers belonging to one panel. If pre-resolved draft layers are provided, skips resolve-draft-layer. Returns {:resolved [...] :stat-results [...] :layers [...]}.

Resolve draft layers and compute stats for a group of draft layers belonging to one panel.
If pre-resolved draft layers are provided, skips resolve-draft-layer.
Returns {:resolved [...] :stat-results [...] :layers [...]}.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close