Skip to main content

Fig Foundry

A WYSIWYG matplotlib figure composer. Load your data (.npz / .pkl / .csv), drag signals onto a free canvas to build plots, arrange and style them, and export clean, reproducible Python.

The preview renders by executing the generated code, so what you see is byte-for-byte what the exported .py produces. There is no second renderer to drift.

Fig Foundry is a standalone local app with no dependency on any particular project's data. It ships with a small neutral sample.npz (1-D signals plus a 2-D field) so a fresh install has something to open; load your own dataset to work with real data.

Install

uv tool install ./path/to/fig_editor     # installs a `figfoundry` command
# or, from a git repo:
uv tool install figfoundry --from "git+https://github.com/<you>/<repo>.git"

Then run:

figfoundry             # starts the web app on http://127.0.0.1:8037 and opens the browser
figfoundry serve --port 9000 --no-browser

Command line

The same engines are available as subcommands for scripting:

figfoundry list                              # list saved figures
figfoundry new --name my-fig                 # create a blank figure, print its slug
figfoundry export SLUG [--out PATH]          # write a figure's generated .py
figfoundry render SLUG --format svg|pdf|png  # render a figure to a file
figfoundry datasets                          # list available datasets

Data

A dataset is a named collection of signals (arrays). Supported formats:

  • .npz — numpy zip of named arrays. Safe by construction.
  • .pkl — Python pickle, loaded through a whitelist unpickler that only permits numpy arrays and plain containers (blocks os, subprocess, socket, ctypes, …). A malicious pickle cannot execute code.
  • .csv — a table with a header row; each numeric column becomes a signal.

1-D and 2-D arrays are both supported (2-D for image/contour/vector plots). Load a dataset with the Load data… button in the toolbar; each canvas is tied to one dataset, and its signals populate the library.

Your figures, datasets, and exports live in ~/.figfoundry/.

What you can do

  • Drag a signal onto the canvas to make a plot (or onto an existing plot to overlay a line / σ-band / error bars / replace).
  • Plot types (23): line, step, scatter, grouped scatter (clustering), bar, bar (horizontal), histogram, box plot, violin plot, 2-D histogram, hexbin, image, contour (filled / lines), pcolormesh, vector field, streamplot, decision boundary, pie, polar, 3-D scatter, surface (3-D), wireframe (3-D).
  • Move, resize (with snapping), and nudge (arrow keys) plots and elements.
  • Multi-select (Shift+click) to nudge / move / delete several at once.
  • Per-plot: data, color, line/marker, σ-band, error bars, ticks, labels, limits, spines, title, colormap + colorbar, and artists (vline, hline, text, annotate, arrow, box, circle, ellipse, polygon, span, legend).
  • Suggest accessible colors — one click applies the colorblind-safe Okabe-Ito palette to a plot's series.
  • LaTeX mathtext in labels, titles, and text (e.g. $x_0$).
  • Layout: grid, align, distribute, margins, sync axis ranges.
  • Figure elements: axis labels, legend, suptitle, free text.
  • Name / duplicate / delete figures. Export the .py (copy or download), and the figure itself as PNG / SVG / PDF (SVG and PDF are vector, for publication).

Everything is also available through a small JSON API (/api/canvases, /api/datasets, /api/palettes, /api/canvases/{slug}/render|code|figure|download).

Testing

The test suite lives in tests/ (outside the package, so it is never shipped). It proves the WYSIWYG invariant (for every plot type), the pickle-safety whitelist, and dataset I/O (npz/pkl/csv), each against a throwaway data dir:

uv run --extra dev pytest -q

Metadata

Release files for figfoundry 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for figfoundry 0.1.0
File Size Uploaded Provenance
figfoundry-0.1.0.tar.gz 188.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for figfoundry 0.1.0
File Interpreter ABI Platform
figfoundry-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 256.9 kB

Release files / figfoundry-0.1.0.tar.gz

Download URL figfoundry-0.1.0.tar.gz
Size 188.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d65dc9f5e1c30ec2f279c2d6dd6ccebb5bc07a5688dbc9abee9cc7e2f70ebb4f
BLAKE2b-256 checksum
How to use checksums
619adadbeb9a8bcd94e53484f6da221ecb53f954014c761e1214e55ede33f0ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / figfoundry-0.1.0-py3-none-any.whl

Download URL figfoundry-0.1.0-py3-none-any.whl
Size 68.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aadfcd57e00b4f144a43946f7400790880e870a8afc8ea1713cc3b86223acdb1
BLAKE2b-256 checksum
How to use checksums
5bd71a85920e4aff0d7fba903727ba100a35741150ea7845be8e5a8c7fd0cc47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for figfoundry 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page