ploot
A terminal plotting library for Rust that renders charts using Unicode Braille characters (U+2800-U+28FF).
Each terminal cell encodes a 2x4 sub-pixel grid, giving smooth curves at high effective resolution without leaving the terminal.

Usage
Add ploot to your Cargo.toml:
[]
= "0.1"
Plot a single series:
let xs: = .map.collect;
let ys: = xs.iter.map.collect;
let plot = quick_plot;
println!;
Plot multiple series with automatic color cycling:
let xs: = .map.collect;
let quadratic: = xs.iter.map.collect;
let cubic: = xs.iter.map.collect;
let sine: = xs.iter.map.collect;
let gaussian: = xs.iter.map.collect;
let plot = quick_plot_multi;
println!;
Features
- Braille rendering - 2x4 sub-pixel resolution per terminal cell via bitwise dot compositing
- ANSI color - automatic 7-color palette cycling across series (blue, red, green, yellow, cyan, magenta, white), with additive color mixing when curves overlap
- Axis layout - auto-generated tick marks using Heckbert's nice numbers algorithm, dynamic label width computation, configurable title and axis labels
- Line drawing - Bresenham's algorithm with dash pattern support (solid, dash, dot, dot-dash, etc.)
- Viewport clipping - Cohen-Sutherland algorithm clips lines to the canvas bounds
- Zero dependencies - pure Rust, no external crates
Architecture
API (quick_plot, quick_plot_multi)
└─ Layout (space allocation, tick generation, frame rendering)
└─ Transform (data → normalized → pixel coordinate mapping, clipping)
└─ Canvas (BrailleCanvas, Bresenham lines, color compositing)
License
Apache-2.0