The Problem
Researchers often need to produce publication‑ready figures that match the visual standards of venues such as ICML, NeurIPS, or Nature Machine Intelligence. Writing these figures from scratch in Python is repetitive and error‑prone. The user wants a ready‑to‑run, reusable collection of scripts that generate consistent, high‑quality visuals for a variety of formats (bar, radar, line, 3‑D sphere, etc.) without having to design each plot manually.
What This Does
The repository packages a set of Python scripts that generate figures end‑to‑end.
figure_*directories contain aplot_*.pyscript that reads raw data (sometimes embedded in the script) and writes the final PNG/PDF.scientific-figure-making/holds the reusable “skill” that defines palette, helper functions, and export conventions.assets/stores figure snippets and design assets that are not fully programmatic but are included for completeness.
Running any plot_*.py script produces the corresponding image in the same folder’s figures/ subdirectory.
How It Is Wired
The code base is flat and script‑centric; there is no central dispatcher.
- Execution starts at an individual
plot_*.pyfile. - Each script imports helper functions from
scientific-figure-making/references/api.md(via a localapi.pygenerated from that Markdown). - The helper layer manages
palette,savefig, andthemeso that every figure follows the same style. - Data is either hard‑coded, loaded from CSV/JSON, or generated on the fly (e.g.,
figure_Cflows/diffusion_swiss_roll.py). - The only external dependencies are standard scientific libraries (
matplotlib,seaborn,pandas,numpy).
No database, network, or stateful service is touched; the side effect is writing an image to the filesystem.
How To Use It
# 1. Clone
git clone https://github.com/moses-y/figures4papers
# 2. Create a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # or .venv\\Scripts\\activate on Windows
# 3. Install dependencies
pip install -r requirements.txt # (requirements.txt is not present; user may need to install manually)
# Example minimal install:
pip install matplotlib seaborn pandas numpy
# 4. Run a figure script
python figure_Brainteaser/plot_brute_force.py
# Output: figure_Brainteaser/figures/brute_force.png
# 5. Repeat for other scripts as needed.
The repository contains no Makefile or requirements.txt, so the user must infer the exact packages from the imports in each script.
Real‑World Use
A research lab can point a CI job at a specific plot_*.py to regenerate a figure whenever the underlying data changes. For example, a pytest‑style test could simply run python figure_ImmunoStruct/plot_bars.py and assert that the output file exists and is not empty. This keeps the figure generation reproducible across paper revisions.
Code Health & Issues
- Medium – Missing Tests – 30 Python files, 0
*_test.pyfiles. - Medium – No CI/CD – No
.github/or CI configuration; automated builds are absent. - Low – No packaging – No
pyproject.tomlorsetup.py; the code is not installable as a library. - Low – Minimal documentation – Only
README.mdandSKILL.md; inline docstrings are sparse. - Low – Dependency ambiguity – Imports are present, but a
requirements.txtis missing; users must manually resolve packages. - Low – License present –
LICENSEfile exists, but license type is not specified in the header of each script.
The Bottom Line
The repo delivers a pragmatic collection of reproducible figure scripts that match the visual quality of top AI conferences. Its strengths lie in clear, single‑script usage and a consistent styling layer. However, the lack of tests, CI, and packaging limits long‑term maintainability. For teams that want to embed figure generation in an automated workflow, adding a minimal requirements.txt, a CI pipeline, and a few unit tests would make the library robust and reusable.