OrbitalCommons / projects / rizzma

Visualize · Rust crate

rizzma

Matplotlib-inspired scientific plotting in Rust. Describe a figure once, then render it to PNG, SVG, PDF, or an interactive browser canvas.

RustMIT / Apache-2.0Native + WebAssembly
Explore rendered plots
A fading signal plotted with rizzmaA sunflower spiral scatter plotA heatmap of two synthetic sources
THREE FIGURES / RIZZMA’S SVG RENDERER

Give your data a little presence.

Good figures help good ideas travel. rizzma follows the familiar Figure → Axes → Artists model, with a pyplot-style facade for quick work and multiple renderers behind the same figure description.

01

A familiar model

Build plots with figures, axes, artists, and a concise pyplot-style API.

02

Several destinations

Use PNG for pixels, SVG or PDF for vectors, and canvas for the browser.

03

Interaction included

The WebAssembly renderer supports browser panning, zooming, and streaming plots.

Explore plots rendered by rizzma

Three small examples, rendered by the published rizzma crate. Pick a view and download the actual output.

The same plotting vocabularyRendered with rizzma
A cyan decaying sinusoid on dark axes. The oscillation amplitude decreases over ten seconds.
A fading signal · 400 synthetic samples · SVG output

These are pre-rendered figures using synthetic data, served directly from this site. See the rendering source, or explore the full plot gallery.

Make your first plot

Terminal
cargo add rizzma

Turn a signal into a figure

Rust · one figure, two formats
use rizzma::pyplot as plt;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let x = [0.0, 1.0, 2.0, 3.0, 4.0];
    let y = [0.0, 0.8, 0.3, -0.4, 0.0];

    plt::plot(&x, &y);
    plt::title("First light");
    plt::xlabel("Time (s)");
    plt::ylabel("Signal");
    plt::savefig("first-light.svg")?;
    plt::savefig("first-light.png")?;
    Ok(())
}

The output extension selects the renderer. Use the object-oriented Figure and Axes APIs when you need more control over layout and artists.

Choose the right view of your data

Target Use it for
PNG Raster figures for reports, presentations, and image workflows.
SVG Scalable figures for websites and vector editing.
PDF Vector output for documents and publication workflows.
Canvas / WebAssembly Interactive browser figures with pan, zoom, and live updates.

Plot types range from lines, scatter, and histograms to contours, heatmaps, polar plots, and 3D views. Perceptually organized color maps and a TeX-subset math renderer support scientific presentation. Explore the API →

Examples and feature notes reviewed against rizzma 1.13.3. Source & contributions →

Keep exploringfitsio-pure

Bring astronomical image data into Rust.