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, PaperSize};

fn main() {
    // Vector field on a 10×10 grid: F(x, y) = (-y, x), a rotation field.
    let mut xs = Vec::new();
    let mut ys = Vec::new();
    let mut us = Vec::new();
    let mut vs = Vec::new();
    for j in -5..=5 {
        for i in -5..=5 {
            let x = i as f64;
            let y = j as f64;
            xs.push(x);
            ys.push(y);
            us.push(-y);
            vs.push(x);
        }
    }

    let fig = Figure::new()
        .size(PaperSize::Square)
        .title("Vector field F = (−y, x)")
        .xlabel("x")
        .ylabel("y")
        .xlim(-6.5, 6.5)
        .ylim(-6.5, 6.5)
        .quiver(&xs, &ys, &us, &vs, |q| q.scale(0.15).head_size(4.0).label("F"))
        .legend_bottom_right();

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