(coverage d-min d-max l-min l-max)
Objective function based on distances between extreme data and extreme labels
Objective function based on distances between extreme data and extreme labels
(density r rt)
Objective function for a candidate density r
and desired density rt
(e.g. labels-per-cm)
Objective function for a candidate density `r` and desired density `rt` (e.g. labels-per-cm)
(max-coverage d-min d-max span)
When the label range is centered on the data range
When the label range is centered on the data range
Preference-ordered list of nice step sizes
Preference-ordered list of nice step sizes
(search [d-min d-max]
&
{:keys [target-density length clamp?]
:or {target-density 0.01 length 500 clamp? false}})
Find best ticks for the data range [d-min, d-max]
.
Returns a map with {:min :max :step :extent :ticks}
of optimal labeling (if one is found).
Returns an empty map if no labelings can be found.
Kwargs:
:target-density labels per length, defaults to 0.01 (one label per 100 units)
:length available label spacing
:clamp? don't return ticks outside of data range, defaults to false.
Since there are no test input/output datasets for the labeling algorithm, I played it safe and copied the imperative algorithm from the paper. If you rewrite it in an understandable and performant functional style, I'll accept a pull request and buy you a bottle of whiskey.
Find best ticks for the data range `[d-min, d-max]`. Returns a map with `{:min :max :step :extent :ticks}` of optimal labeling (if one is found). Returns an empty map if no labelings can be found. Kwargs: > *:target-density* labels per length, defaults to 0.01 (one label per 100 units) > *:length* available label spacing > *:clamp?* don't return ticks outside of data range, defaults to false. Since there are no test input/output datasets for the labeling algorithm, I played it safe and copied the imperative algorithm from the paper. If you rewrite it in an understandable and performant functional style, I'll accept a pull request and buy you a bottle of whiskey.
(simplicity q j label-range-contains-zero)
Objective function modeling niceness of step sizes and whether a range includes zero
Objective function modeling niceness of step sizes and whether a range includes zero
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close