Skip to main content

figquilt is a small, language-agnostic CLI tool that composes multiple figures (PDF/SVG/PNG) into a single publication-ready figure, based on a simple layout file (YAML/JSON). The key function is creating a PDF by composing multiple PDFs and adding subfigure labels and minimal annotations.

Project description

figquilt

Figure quilter: A declarative CLI tool for compositing multiple figures (PDF, SVG, PNG) into publication-ready layouts.

figquilt takes a simple layout file (YAML) describing panels and their structure, composed of various inputs (plots from R/Python, diagrams, photos), and stitches them into a single output file (PDF, SVG) with automatic labeling and precise dimension control.

Philosophy

  • Declarative over imperative: Describe what your figure should look like, not how to construct it. Layouts are data, not scripts.
  • Structural composition first: Prefer high-level layout (rows, columns, ratios) over manual coordinate placement. Let the tool handle positioning.
  • Fine control when needed: Override with explicit coordinates and dimensions when precision matters.
  • Automation-friendly: Designed to fit into reproducible workflows (Snakemake, Make, CI pipelines). No GUI, no manual steps.

Features

  • Precise Layout: Define exact physical dimensions (mm) for the page and panels.
  • Mixed Media: Combine PDF, SVG, and PNG inputs in one figure.
  • Automated Labeling: Automatically add subfigure labels (A, B, C...) with consistent styling.
  • Reproducible: Layouts are defined in version-controllable text files (YAML).
  • Language Agnostic: It is a CLI tool, so it works with outputs from any tool (R, Python, Julia, Inkscape, etc.).

Installation

uv tool install figquilt

Or add it as a project dependency:

uv add figquilt

Development Installation

git clone https://github.com/yy/figquilt.git
cd figquilt
uv sync

Usage

Define a layout in a YAML file (e.g., figure1.yaml):

page:
  width: 180  # mm
  height: 120 # mm
  
panels:
  - id: A
    file: "plots/scatter.pdf"
    width: 80
    x: 0
    y: 0
  - id: B
    file: "diagrams/schematic.svg"
    width: 80
    x: 90
    y: 0

Run figquilt to generate the figure:

figquilt figure1.yaml figure1.pdf

Watch Mode

Use --watch to automatically rebuild when the layout file or any panel source files change:

figquilt --watch figure1.yaml figure1.pdf

This is useful during layout iteration - edit your YAML or regenerate a panel, and the output updates automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

figquilt-0.1.3.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figquilt-0.1.3-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file figquilt-0.1.3.tar.gz.

File metadata

  • Download URL: figquilt-0.1.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for figquilt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3e52223bf854c0af961728d3cd3b0c64cceb39be1a7ce222f91f7a5f6a7c4a86
MD5 a927ab97b2b9fc1c6b15cd75ad4a07da
BLAKE2b-256 0121814af753e8fb9153905e82c39662d62eb8708bd38818644625f6de671697

See more details on using hashes here.

File details

Details for the file figquilt-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: figquilt-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for figquilt-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c369ed7228dfc2e08b056a3beb80c609a43a2e13772cf63d1a2922cf01607f1
MD5 177e4767b544c12b310955127f8f5b1f
BLAKE2b-256 6c1d9e2ee0c3b2e8bfec2930faeeaf4008d14ebb39790d1844a7da50d4721d56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page