liftof_tui::widgets

Function clean_data

Source
pub fn clean_data<'a>(
    histo: &'a Hist1D<Uniform<f32>>,
    labels: &'a Vec<String>,
    clean_from: usize,
) -> Vec<(&'a str, u64)>
Expand description

Adapt the bins of the histogram for the bar chart which will get rendered. Always show a minimum number of bins, but if the max y-bin is “too far to the left” then shorten the range for a better visualization

§Arguments

  • labels : bin labels for rendering
  • clean_from : leave bins below this untouched