bland 0.2.1

Pure-Rust library for paper-ready, monochrome, hatch-patterned technical plots in the visual tradition of 1960s-80s engineering reports.
Documentation
use bland::{Figure, Hatch, PaperSize};

fn main() {
    // Synthetic samples per group.
    let control: Vec<f64> = (0..30)
        .map(|i| 5.0 + ((i as f64 * 0.43) % 1.0 - 0.5) * 3.0)
        .collect();
    let mut treated: Vec<f64> = (0..30)
        .map(|i| 7.0 + ((i as f64 * 0.71 + 0.1) % 1.0 - 0.5) * 4.0)
        .collect();
    treated.push(15.0); // outlier

    let groups = vec![
        ("control".to_string(), control),
        ("treated".to_string(), treated),
    ];

    let fig = Figure::new()
        .size(PaperSize::A5Landscape)
        .title("Distribution by group")
        .ylabel("response")
        .boxplot(&groups, |b| b.hatch(Hatch::Diagonal).label("Q1–Q3"))
        .legend_top_right();

    std::fs::create_dir_all("out").expect("create out/");
    std::fs::write("out/boxplot.svg", fig.to_svg()).expect("write svg");
    println!("wrote out/boxplot.svg");
}