Figure Generator
This is an awesome figure generator. It generates figures in pdf-, html- and pptx-format.
The following image shows the output of one of our test files ("tests/pool.py"):
This tool might help not only to create final figures, but also to analyze images faster: We offer a bunch of error metrics that allows not only to compare images visually but also mathematically.
Why did we create a figure generator?
In rendering research, it is quite common to create figures of "comparison"-type. Meaning, that we start with a set of generated images, that needs to be compared. Often, one rendered scene is not enough, therefore, we need several comparison figures - preferably in a similar or same style as the other created figures.
We support grids (images that are grid-like arranged) and simple line-plotting. To get a further understanding what grids are, you might want to have a look at our tutorial (Tutorial.ipynb).
Dependencies
Mandatory:
- Python 3.11+ with opencv-python, simpleimageio, and texsnip
Optional:
- For the .pdf backend: pdflatex (in path) with at least: tikz, calc, standalone, fontenc, libertine, inputenc.
- For the .pptx backend: python-pptx
- To include pdf files as image data: PyPDF2, and pdf2image (which requires poppler).
Quickstart
You can install the figure generator and all mandatory dependencies with a simple:
python -m pip install figuregen
The fastest way to get a first figure is by using an existing template:
import simpleimageio as sio
import figuregen
from figuregen.util.templates import CropComparison
from figuregen.util.image import Cropbox
figure = CropComparison(
reference_image=sio.read("images/pool/pool.exr"),
method_images=[
sio.read("images/pool/pool-60s-path.exr"),
sio.read("images/pool/pool-60s-upsmcmc.exr"),
sio.read("images/pool/pool-60s-radiance.exr"),
sio.read("images/pool/pool-60s-full.exr"),
],
crops=[
Cropbox(top=100, left=200, height=96, width=128, scale=5),
Cropbox(top=100, left=450, height=96, width=128, scale=5),
],
scene_name="Pool",
method_names=["Reference", "Path Tracer", "UPS+MCMC", "Radiance-based", "Ours"]
)
# here you can modify the figure layout and data
# ...
# Generate the figure with the pdflatex backend and default settings
figuregen.figure([figure.figure_row], width_cm=17.7, filename="pool_with_template.pdf")
The template simply creates a list of Grid objects that can be modified and extended arbitrarily before passing it to the figure() function.
Examples and inspiration for creating your own figure layouts can be found in our examples or the Jupyter tutorial.
Examples
Clicking on an image below leads to the test that created the corresponding figure.
Vertical stacks
Split Comparison
Crop Comparison
Plots
Grid with titles, labels, markers, and frames
Metadata
Release files for figuregen 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| figuregen-1.3.3.tar.gz | 68.1 kB | With provenance | Details for figuregen-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| figuregen-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for figuregen-1.3.3-py3-none-any.whl |
Total release size: 140.5 kB
Release files / figuregen-1.3.3.tar.gz
| Download URL | figuregen-1.3.3.tar.gz |
|---|---|
| Size | 68.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1f6dd82d5f16fe8ab1dbc46c2f38c98d26af92106480ad487fccc8374aecf5b
|
|
BLAKE2b-256 checksum How to use checksums |
5c85ab57ea6360a32ee0372705269efb6ddc767fd1bcb92c1518c59bef93c9dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2025.
Transparency logRelease files / figuregen-1.3.3-py3-none-any.whl
| Download URL | figuregen-1.3.3-py3-none-any.whl |
|---|---|
| Size | 72.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad94978ce8bfb5201fece6e02a7fb4c72ad73b2fc541b85b6019d97b2386e076
|
|
BLAKE2b-256 checksum How to use checksums |
888145852099ccc131aec061cafa2a1e57ed400926085ef329abfcc6d4cd00a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2025.
Transparency logSecurity for figuregen 1.3.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for figuregen-1.3.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2025.
Transparency logA 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.