Liking cljdoc? Tell your friends :D

scicloj.plotje.impl.position

Position adjustment — composable transforms on layer descriptors. Runs between extract-layer and build-panels in the plan pipeline.

Position types: :identity — no adjustment (default) :dodge — side-by-side within a categorical band (annotation) :stack — cumulative y-values across groups (data transform) :fill — normalized cumulative y, sums to 1.0 (data transform)

Position adjustment — composable transforms on layer descriptors.
Runs between extract-layer and build-panels in the plan pipeline.

Position types:
  :identity — no adjustment (default)
  :dodge    — side-by-side within a categorical band (annotation)
  :stack    — cumulative y-values across groups (data transform)
  :fill     — normalized cumulative y, sums to 1.0 (data transform)
raw docstring

apply-positioncljmultimethod

Apply position adjustment to layers sharing a position type. Returns a vec of adjusted layers.

Apply position adjustment to layers sharing a position type.
Returns a vec of adjusted layers.
sourceraw docstring

apply-positionsclj

(apply-positions layers)

Apply position adjustments to all layers in a panel. Groups layers by position type and applies adjustments per group. Stack/fill: modifies y-values (data transform). Dodge: annotates groups with indices (layout annotation).

The returned layers are in the input (pose) order, which becomes the paint order downstream. Grouping by position type is only an internal step so stack/dodge can compute geometry shared across same-position layers; it must not leak into paint order. (It used to: emitting in the canonical position order meant text/label marks -- position :identity -- always painted before, and so under, bar marks -- position :dodge/:stack -- regardless of the order the author added them.)

Apply position adjustments to all layers in a panel.
Groups layers by position type and applies adjustments per group.
Stack/fill: modifies y-values (data transform).
Dodge: annotates groups with indices (layout annotation).

The returned layers are in the input (pose) order, which becomes the
paint order downstream. Grouping by position type is only an internal
step so stack/dodge can compute geometry shared across same-position
layers; it must not leak into paint order. (It used to: emitting in
the canonical position order meant text/label marks -- position
:identity -- always painted before, and so under, bar marks -- position
:dodge/:stack -- regardless of the order the author added them.)
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