(arc-interpolate coord-px px1 py1 px2 py2 n-seg)Subdivide a line segment in pixel space through coord-px reprojection. Given two pixel-space endpoints (already in Cartesian panel coords), interpolates n intermediate points, projects each through coord-px, and returns a seq of [x y] pairs. Used for smooth wedge edges in polar.
Subdivide a line segment in pixel space through coord-px reprojection. Given two pixel-space endpoints (already in Cartesian panel coords), interpolates n intermediate points, projects each through coord-px, and returns a seq of [x y] pairs. Used for smooth wedge edges in polar.
(band-position band-s category group-idx n-groups frac)Compute dodged position within a categorical band. Returns {:lo :hi :mid} pixel coordinates for one sub-band.
Compute dodged position within a categorical band.
Returns {:lo :hi :mid} pixel coordinates for one sub-band.
- band-s: wadogo band scale
- category: category value to look up
- group-idx: index of this group within n-groups
- n-groups: total number of dodge groups
- frac: fraction of band width to use (e.g. 0.8)(bar-polygon coord-px flipped? cat-lo cat-hi val-lo val-hi)Compute polygon points for a rectangular bar, with arc interpolation when coord-px is provided (polar). In cartesian/flip, produces a simple 4-corner closed polygon.
Compute polygon points for a rectangular bar, with arc interpolation when coord-px is provided (polar). In cartesian/flip, produces a simple 4-corner closed polygon. - coord-px: pixel-space reprojection fn, or nil for cartesian - flipped?: true when axes are swapped - cat-lo, cat-hi: pixel range along the categorical (band) axis - val-lo, val-hi: pixel range along the numeric (value) axis
Convert a plan layer into membrane drawable primitives.
layer is a plan layer map with data-space geometry and resolved colors.
ctx contains :coord-fn, :sx, :sy, :coord-type.
Dispatches on (:mark layer).
Convert a plan layer into membrane drawable primitives. `layer` is a plan layer map with data-space geometry and resolved colors. `ctx` contains :coord-fn, :sx, :sy, :coord-type. Dispatches on (:mark layer).
(layer->membrane-categorical-bars layer ctx)Render categorical count bars from a plan :rect layer. Stack: reads pre-computed :y0/:y1 from position adjustment. Dodge: reads :dodge-idx/:dodge-ctx from position adjustment.
Render categorical count bars from a plan :rect layer. Stack: reads pre-computed :y0/:y1 from position adjustment. Dodge: reads :dodge-idx/:dodge-ctx from position adjustment.
(layer->membrane-value-bars layer ctx)Render value bars from a plan :rect layer.
Render value bars from a plan :rect layer.
(orient-scales ctx)Extract oriented scales from rendering context.
For categorical marks that need band positioning, returns the
categorical (band) scale and numeric scale, swapped when flipped.
Flipped means either :coord :flip is in effect, or the panel's
y-axis is itself a band scale (numerical x + categorical y).
Returns {:flipped? :band-s :num-s}.
Extract oriented scales from rendering context.
For categorical marks that need band positioning, returns the
categorical (band) scale and numeric scale, swapped when flipped.
Flipped means either `:coord :flip` is in effect, or the panel's
y-axis is itself a band scale (numerical x + categorical y).
Returns {:flipped? :band-s :num-s}.(ridgeline-positions categories panel-height margin)Compute ridgeline band positions for a list of categories. Returns a vector of [category-name {:mid pixel-y :bw band-width}] pairs, preserving the input category order. Used by both the ridgeline renderer and panel tick label placement.
Returns a vector (not a map) so iteration order is deterministic
regardless of category count -- (into (array-map) ...) quietly
promotes to PersistentHashMap on the 9th key, scrambling the
order via Clojure hash. Callers do (get pos cat) style lookup
so they need to convert to a map locally if random access matters.
Compute ridgeline band positions for a list of categories.
Returns a vector of [category-name {:mid pixel-y :bw band-width}]
pairs, preserving the input category order. Used by both the
ridgeline renderer and panel tick label placement.
Returns a vector (not a map) so iteration order is deterministic
regardless of category count -- `(into (array-map) ...)` quietly
promotes to PersistentHashMap on the 9th key, scrambling the
order via Clojure hash. Callers do `(get pos cat)` style lookup
so they need to convert to a map locally if random access matters.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |