Scales¶
Scale and its subclasses — LinearScale, LogScale, OrdinalScale, etc.
Ferrum — a statistical visualization library with a Rust core.
BandScale ¶
Discrete band scale for bar charts.
padding, padding_inner and padding_outer are each None
until the caller sets them. With none set, bands lay out exactly as the
auto-inferred categorical axis does (no inner or outer padding), not
Vega-Lite's 0.1 convention. An unset side falls back to padding,
then to 0 (d3's own behavior), so padding_inner=0.2 alone leaves
outer padding at 0, not 0.1. The getters mirror this: padding returns
the user-set value or None; padding_inner/padding_outer
return side ?? padding, or None when neither is set. An explicit
0.0 is distinct from None in equality and repr(), even though
both resolve to the same rendered geometry.
BinOrdinalScale ¶
ContinuousScheme ¶
DivergingScale ¶
LinearScale ¶
LogScale ¶
OrdinalScale ¶
PointScale ¶
Discrete point scale for dot plots.
padding defaults to None in the constructor, and the padding
getter returns it as passed: None when unset, as BandScale,
LinearScale and TimeScale do (OrdinalScale is the exception:
its constructor defaults padding to 0.0 and its getter returns
that). The renderer owns the default for an unset padding (half
a step at each end). Equality and repr() see the same value, so
PointScale() != PointScale(padding=0.5) and repr(PointScale())
prints padding=None, even though both render identically.