pub fn fitting_range<'a, T, I: IntoIterator<Item = &'a T>>(iter: I) -> Range<T>
Expand description
Build a range that fits the data
iter
: the iterator over the data- returns The resulting range
use plotters::data::fitting_range;
let data = [4, 14, -2, 2, 5];
let range = fitting_range(&data);
assert_eq!(range, std::ops::Range { start: -2, end: 14 });