Skip to main content

Module binned

Module binned 

Source
Expand description

Binned fill/colour scale with explicit class breaks (R’s scale_fill_steps/scale_fill_fermenter generalised to arbitrary, caller-supplied edges — ggplot2’s scale_fill_binned with breaks set “manually”), backing a ::CLASSES choropleth (sipemu/ggplot-rs#180).

The break maths — quantile/Fisher-Jenks/equal-width/custom edges — stays the caller’s job (anofox-visualization’s map/classes.rs); this scale only bins against the edges it’s given, tallies how many trained values fall in each bin, and draws a stepped legend with those counts plus a “no data” key for Value::Na (ggplot2’s na.value).

Structs§

ScaleFillBinned
Binned fill/colour scale: n classes from n + 1 increasing edges, each with its own colour. See the module docs for how it relates to scale_fill_steps/::CLASSES.