kuva
A scientific plotting library in Rust. 64 plot types, SVG output, optional PNG/PDF backends, and a CLI binary that renders plots directly from the shell — including in the terminal itself.

Quick start
Install the CLI
Step 1 — install Rust (skip if you already have cargo):
|
# then restart your shell, or run:
Step 2 — install kuva:
# From crates.io — installs to ~/.cargo/bin/ (on your $PATH after rustup setup)
# From a local clone — SVG output only
# From a local clone — with PNG and PDF output
After installation, kuva is available anywhere in your shell — no need to reference ./target/release/kuva or set any paths manually.
Use as a library
Add to Cargo.toml:
[]
= "0.5"
# Optional backends
= { = "0.5", = ["png"] } # PNG output
= { = "0.5", = ["pdf"] } # PDF output — requires Rust >= 1.92 (higher than kuva's own MSRV; see below)
= { = "0.5", = ["full"] } # PNG + PDF
Note on the
krilla(the maintained successor to the now-archivedsvg2pdf), which requires Rust >= 1.92. This isn't reflected in kuva's crate-levelrust-version— doing so would force every kuva user, including ones who never enablefull, kuva itself still only needs Rust 1.87.
Then in Rust:
use *;
let plot = new
.with_data
.with_color
.with_legend;
let plots: = vec!;
let layout = auto_from_plots
.with_title
.with_x_label
.with_y_label;
let svg = render_to_svg;
write.unwrap;
Use the CLI
# Scatter plot to SVG
# Volcano plot, label top 20 genes
# Ridgeline plot — stacked density curves, one per group
# Box plot rendered directly in the terminal
Input is auto-detected TSV or CSV. .parquet files are also supported. Columns are selectable by name or 0-based index. Pipe from stdin by omitting the file argument. Output defaults to SVG on stdout; use a .svg, .png, or .pdf extension with -o to write a file. Extensions are case-insensitive, and other extensions are rejected.
Documentation
Full documentation — plot type reference, API guide, CLI flag reference, themes, palettes, and benchmarks — is at psy-fer.github.io/kuva.
Contributors
Thank you to everyone who has contributed to kuva!
Ecosystem
Other Rust plotting libraries worth knowing about:
- charton: A general-purpose plotting library implementing the Grammar of Graphics in Rust. It offers a declarative API (similar to ggplot2/Altair) that builds complex charts through layer composition. It provides first-class native support for Polars, integrates with the Jupyter/evcxr ecosystem, and can even interoperate with Matplotlib/Altair for hybrid workflows.
Development note
kuva was initially built by hand, with a working library and several plot types already in place before AI tooling was introduced. From that point, development was heavily assisted by Claude (Anthropic) — accelerating the addition of new plot types, the CLI binary, tests, and documentation. The architecture, domain knowledge, and direction remain the author's own; Claude was used as an accelerant, not an author.
This disclaimer was written by Claude as an honest assessment of its own role in the project.
License
MIT