What Is FigMirror?
FigMirror is a VILA-Lab project that turns a reference figure into editable matplotlib code and a camera-ready PDF; it is one of the best Scientific Visualization Tools for researchers, ML engineers, and developers who need publication-grade figures without hand-tuning every axis and legend. The repository shows a gallery of 139 figures across 25 chart families, which is enough to prove the workflow is meant for real paper layouts rather than toy demos.
FigMirror is built around a local, agentic workflow that starts from a screenshot and ends with a script you can edit. If you ship plots into papers, slide decks, or technical reports, the value is simple: keep the style of the reference figure while changing the underlying data.
Quick Overview
| Attribute | Details |
|---|---|
| Type | Scientific Visualization Tools |
| Best For | researchers, ML engineers, and developers preparing publication figures |
| Language/Stack | Python, matplotlib, uv, Claude Code, Codex, local web UI |
| License | N/A |
| GitHub Stars | N/A |
| Pricing | Open-Source |
| Last Release | N/A |
Who Should Use FigMirror?
- Paper authors who need a new chart to match the exact visual language of an existing figure without rebuilding the style from scratch.
- ML and data teams producing plots for papers, benchmark reports, or arXiv drafts where axis spacing, fonts, and annotation density must stay consistent.
- Indie hackers shipping technical writeups or docs that need polished figures faster than manual Matplotlib iteration.
- Agentic workflow users already working in Claude Code or Codex who want figure editing to happen inside the same prompt-driven loop.
Not ideal for:
- Teams that need interactive dashboards, cross-filtering, or hover-driven exploration instead of static paper figures.
- Users who only want quick exploratory charts and do not care about style transfer from a reference image.
- Projects that depend on a fully managed SaaS with hosted collaboration, because FigMirror is designed as a local, repo-driven workflow.
Key Features of FigMirror
- Reference-driven style transfer — FigMirror uses a reference figure as the style target, then renders your data until the output visually matches the same paper family. That is a better fit than manually re-tuning
matplotlib.rcParamswhen you need one-off publication fidelity. - Editable matplotlib output — the system does not stop at a screenshot; it produces an editable script so you can change data, labels, tick marks, and export settings after generation. That matters when a reviewer asks for a revised subplot or a swapped color scale.
- Drawer-Reviewer agent loop — FigMirror iterates through a Drawer that renders candidates and a Reviewer that checks visual drift, then feeds back a revision checklist. The loop is designed for controlled refinement instead of one-shot generation.
- Grounded Measurement — the method uses visual measurements tied to axes and code-backed checks, so the agent can compare colors, segments, and geometry against the reference image rather than guessing from text alone. The project describes this as a bridge between visual targets and executable validation.
- Preserve list against style drift — each revision accumulates a preserve list that anchors the figure’s style across iterations. That reduces the common failure mode where later edits accidentally break spacing, proportions, or annotation placement.
- 3D-aware figure repair — for 3D plots, FigMirror adds geometry-aware prompting for camera, scale, surfaces, lighting, and repair checks. That is the difference between a rough surface plot and a paper figure that still reads correctly after export.
- Local web UI and agent skills — the repo supports a browser UI for upload, preview, and iteration history, plus skill-based use inside Claude Code and Codex. If you want a broader agent workspace around this pattern, Claude Code Canvas and OpenSwarm fit well beside it.
FigMirror vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| FigMirror | Paper-style figure cloning from a reference image | Agentic Drawer-Reviewer loop with grounded visual checks and editable matplotlib export | Open-Source |
| Matplotlib | Full manual control over scientific plots | Direct plotting API with zero image-to-style mirroring | Open-Source |
| Seaborn | Fast statistical charts with sensible defaults | Higher-level interface for exploratory data visualization, not reference matching | Open-Source |
| Plotly | Interactive browser charts | Built for hover, zoom, and web delivery rather than camera-ready style imitation | Open-Source |
Pick Matplotlib when you already know the exact aesthetic you want and are comfortable encoding every visual rule yourself. Pick Seaborn when the chart is exploratory and the goal is clean defaults instead of reproducing a target paper figure.
Pick Plotly when interaction matters more than static export quality. Pick FigMirror when the reference image is the spec and the hard part is preserving that spec while swapping in new data.
If your workflow is more about prompt orchestration than figure reproduction, Brainstorm MCP can help structure the analysis step before you hand the result to FigMirror. If you want a chat-first environment for editing and agent control, Claude Context Mode is a practical companion rather than a replacement.
How FigMirror Works
FigMirror works as a two-agent loop: the Drawer renders a candidate figure, and the Reviewer compares that render with the reference image. The loop keeps a preserve list, applies a revision checklist, and uses Grounded Measurement so the system can check specific visual targets instead of relying on vague language.
The technical idea is straightforward: the reference image is treated like a spec, and the editable matplotlib script is the deliverable. The repository also describes an Aesthetic Lib that supplies fallback style rules and figure properties when the agents disagree or when the Drawer has low confidence.
For 3D charts, FigMirror adds camera, lighting, surface, and scale reasoning so the output stays structurally similar to the source figure. That makes it useful for plots where a small projection change can destroy readability.
git clone https://github.com/VILA-Lab/FigMirror.git && cd FigMirror
bash scripts/install.sh
uv run python scripts/figcopy_serve.py --workspace .artifacts/figmirror-workspace --backend codex
The command above clones the repo, installs the project, and starts the local web app on http://127.0.0.1:8765/. From there, you upload or attach a reference figure, supply your data, and let the loop refine the output until the style matches the target.
Pros and Cons of FigMirror
Pros:
- Produces editable
matplotlibcode instead of a dead image, so revisions stay cheap after the first pass. - Uses a reference figure as the style spec, which is much closer to real paper workflows than generic chart generation.
- Supports a browser-based local app, so you can inspect iterations and refinement history without leaving the machine.
- Includes a skill-only path for Claude Code and Codex, which is useful if you already live in an agentic terminal workflow.
- Handles 3D figure repair with geometry-aware prompting, which is rare in plotting tools.
- Ships with a public gallery of 139 figures across 25 chart families, so the method is easy to sanity-check against real examples.
Cons:
- It is not an interactive visualization stack, so it will not replace Plotly, Vega-Lite, or a dashboard framework.
- The best results depend on having a good reference figure; low-quality screenshots will constrain the output.
- The workflow is more opinionated than plain Matplotlib, which means some edge cases will still need manual editing.
- Local setup is more involved than a single Python package import, especially if
uvis not already installed. - The project is optimized for paper-style output, so it is the wrong choice when the goal is exploratory analysis rather than publication fidelity.
Getting Started with FigMirror
The fastest path is to install the repo locally, then run the web UI so you can upload a reference figure and inspect the iteration loop. If uv is missing, install it first with python3 -m pip install uv.
git clone https://github.com/VILA-Lab/FigMirror.git
cd FigMirror
bash scripts/install.sh
uv run python scripts/figcopy_serve.py --workspace .artifacts/figmirror-workspace --backend codex
After startup, open http://127.0.0.1:8765/ in a browser and submit a figure screenshot plus your data. FigMirror then generates an editable script, iterates on visual differences, and keeps the revision history inside the workspace so you can debug style drift instead of starting over.
Verdict
FigMirror is the strongest option for paper-style figure reconstruction when you already have a reference image and need editable matplotlib output. Its biggest strength is the Drawer-Reviewer loop with grounded measurement; the main caveat is that it is still a local, opinionated workflow and not a general interactive plotting platform. Use it when publication fidelity matters more than convenience.



