rizzma
A Rust reimplementation of the good parts of matplotlib / pyplot, rendering one
figure to PNG, SVG, and PDF — plus a browser <canvas>/WebAssembly backend.
use Figure;
let mut fig = new;
let ax = fig.add_axes;
ax.plot;
ax.set_title;
fig.save_png.unwrap;
What's inside
rizzma is a single crate; the subsystems are modules, with the most-used types
(Figure, Axes, PolarAxes, GridSpec, SubplotSpec) re-exported at the crate root:
| Module | What it does |
|---|---|
rizzma::figure |
Figure / Axes / PolarAxes — 40+ plot types (line, scatter, bar, hist, box/violin, hexbin, contour/contourf, pcolormesh, quiver, streamplot, pie, tri*, …) |
rizzma::axis |
ticks, scales (linear / log / symlog / logit), date axes |
rizzma::mathtext |
TeX-subset math layout for $...$ labels and titles |
rizzma::artist |
Line2D, Patch, markers, quad meshes |
rizzma::core |
geometry, color, colormaps, transforms |
rizzma::render + rizzma::skia / rizzma::svg / rizzma::pdf |
the Renderer seam and the PNG / SVG / PDF backends |
rizzma::mplot3d |
3D axes — plot3d / scatter3d / plot_surface / bar3d / plot_wireframe (feature plot3d) |
rizzma::pyplot |
stateful plt.*-style facade (feature pyplot) |
rizzma::wasm |
browser canvas backend (feature wasm) |
Features
The plot3d, pyplot, and wasm modules are on by default. Opt out for a leaner
build (core 2D plotting + PNG/SVG/PDF):
= { = "1", = false }
Gallery & docs
A rendered example of every plot type, plus the design docs, live in the project repository.
License
Licensed under either of MIT or Apache-2.0 at your option.