[Media] Charton — a declarative plotting library for Rust, plus a Nushell plugin
![[Media] Charton — a declarative plotting library for Rust, plus a Nushell plugin](https://i.redd.it/dweu7zf5brth1.png)
I've been working on Charton, a plotting library for Rust. The API is declarative, in the style of Altair and ggplot: you compose charts from marks and encodings rather than calling a separate function per chart type. It plays nicely with Polars, exports SVG/PNG/PDF, and runs in the browser through Wasm. There's a wgpu backend too, if you want to draw charts inside an egui app.
If you use Nushell, there's nu_plugin_charton. It turns any pipeline table into a chart, so ls | charton -g bar -x name -y size just works. It draws inline in terminals that support Kitty/iTerm2/Sixel/half-blocks, or you can save SVG/PNG with -o. For basic charts -g and -x and -y are all you need; color, stacking, faceting and themes are optional flags.