Skip to content

Commit

Permalink
Trim y min on plot
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Nov 9, 2024
1 parent 9e283e4 commit 346543a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benches/throughput/result_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ResultProcessor for OutputPlot {
let x_min = self.series.iter().next().unwrap().1.iter().map(|(x, _)| *x as u32).min().unwrap();
let x_max = self.series.iter().next().unwrap().1.iter().map(|(x, _)| *x as u32).max().unwrap();

let y_min = 0u32;
let y_min = self.series.iter().flat_map(|inner_map| inner_map.1.iter()).map(|(_, y)| (0.95 * *y) as u32).min().unwrap();
let y_max = self.series.iter().flat_map(|inner_map| inner_map.1.iter()).map(|(_, y)| (1.05 * *y) as u32).max().unwrap();

let mut chart = ChartBuilder::on(&canvas)
Expand Down

0 comments on commit 346543a

Please sign in to comment.