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

Function box_slot_widths

crates/plotlars-plotters/src/render/boxplot.rs:70–77  ·  view source on GitHub ↗

`slot_width` is the per-group horizontal slice; `box_width` is the rendered box width within the slot, narrowed when grouped so adjacent boxes don't touch.

(n_groups: usize)

Source from the content-addressed store, hash-verified

68/// `slot_width` is the per-group horizontal slice; `box_width` is the rendered
69/// box width within the slot, narrowed when grouped so adjacent boxes don't touch.
70fn box_slot_widths(n_groups: usize) -> (f64, f64) {
71 if n_groups > 1 {
72 let slot = 0.8 / n_groups as f64;
73 (slot, slot * 0.5)
74 } else {
75 (0.5, 0.5)
76 }
77}
78
79/// Detect if any trace requests horizontal orientation.
80fn is_horizontal(traces: &[TraceIR]) -> bool {

Callers 1

render_boxplotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected