pub fn resolution(x: &[f64], zero: bool) -> f64
The smallest non-zero gap between the (unique) values of x — ggplot2’s resolution(x, zero); zero = true also counts the distance to 0. Constant data → 1.
x
resolution(x, zero)
zero = true