bland 0.1.0

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

fn main() {
    let xs = vec![-2.0, -1.0, 0.0, 1.0, 2.0, 1.5, 0.0, -1.5];
    let ys = vec![-1.0, -2.0, -1.5, -2.0, -0.5, 1.5, 2.0, 1.5];

    let fig = Figure::new()
        .size(PaperSize::A5Landscape)
        .title("Polygon test")
        .xlabel("x")
        .ylabel("y")
        .xlim(-3.0, 3.0)
        .ylim(-3.0, 3.0)
        .polygon(&xs, &ys, |p| p.label("region").hatch(Hatch::Diagonal).stroke(Stroke::Solid))
        .legend_top_right();

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