Transform a range to log10 space, clamping the lower bound to a positive value.
(min: f64, max: f64)
| 58 | |
| 59 | /// Transform a range to log10 space, clamping the lower bound to a positive value. |
| 60 | pub(super) fn log_range(min: f64, max: f64) -> (f64, f64) { |
| 61 | let lo = if min > 0.0 { min } else { max * 1e-6 }; |
| 62 | (lo.log10(), max.log10()) |
| 63 | } |
| 64 | |
| 65 | /// Transform a slice of (x, y) pairs to log10 space on the requested axes, |
| 66 | /// filtering out non-positive values on log axes. |