pub fn boxplot(x: &[f64], y: &[f64]) -> BoxPlotChartExpand description
Create a box plot from x and y data.
The data is binned by x values, and for each bin, box-and-whisker statistics are calculated from the y values.
ยงExample
use gpui_px::boxplot;
// Generate some sample data
let x: Vec<f64> = (0..100).map(|i| (i / 10) as f64).collect();
let y: Vec<f64> = x.iter().map(|&xi| xi * 2.0 + rand::random::<f64>() * 10.0).collect();
let chart = boxplot(&x, &y)
.title("Distribution by Group")
.box_color(0xdddddd)
.median_color(0x000000)
.build()?;