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 CLI tool to compositing multiple figures (PDF, SVG, PNG) into a publication-ready figure layout.

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

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

This project uses uv for dependency management.

# Clone the repository
git clone https://github.com/yy/figquilt.git
cd figquilt

# Install dependencies and set up the environment
uv sync

# Install the package in editable mode
uv pip install -e .

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

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.0.tar.gz (7.1 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.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for figquilt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bf1271b2844b42fe6eac3b06bf9f5ffa8db93372e22d468f88a531f9c60381a5
MD5 3b3fdb70cb437a52ae3bea32f2095816
BLAKE2b-256 53338af1ae97385cad12f4ee425019c0d9b5d146cb6c9603f5911631f801d763

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for figquilt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a604811bb6e5f11069d1702e511ea5c974f8f76080d2ce8f55fe7e654e98945
MD5 ac7e70b2e4680524aed2847e45532a55
BLAKE2b-256 37f687785f95b6cb85210154ad7cb758b06d8f26f308a96b4a8ab9396c632842

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