MCPcopy Create free account
hub / github.com/alceal/plotlars / histogram_max_count

Function histogram_max_count

crates/plotlars-plotters/src/converters/trace.rs:293–309  ·  view source on GitHub ↗
(traces: &[TraceIR])

Source from the content-addressed store, hash-verified

291}
292
293pub(crate) fn histogram_max_count(traces: &[TraceIR]) -> f64 {
294 let mut max_count = 0usize;
295 for trace in traces {
296 if let TraceIR::Histogram(ir) = trace {
297 let values = extract_f64(&ir.x);
298 let (_, counts) = if let Some(ref bins_ir) = ir.bins {
299 compute_bins_from_ir(&values, bins_ir)
300 } else {
301 auto_compute_bins(&values)
302 };
303 for &c in &counts {
304 max_count = max_count.max(c);
305 }
306 }
307 }
308 max_count as f64
309}

Callers 1

render_numericFunction · 0.85

Calls 3

extract_f64Function · 0.85
compute_bins_from_irFunction · 0.85
auto_compute_binsFunction · 0.85

Tested by

no test coverage detected