figrecipe
Reproducible matplotlib figures with mm-precision layouts, declarative specs, YAML recipes, multi-panel composition, and diagram generation. Use when creating publication-ready figures.
figrecipe
Reproducible, style-editable scientific figures via YAML recipes. Drop-in replacement for plt.subplots() that records all plotting calls for exact reproduction.
Sub-skills
- quick-start — Core workflow: subplots, save, reproduce
- plot-types — All supported plot types with examples
- composition — Multi-panel figure composition (grid and mm-based)
- cropping — Figure cropping, whitespace removal
- styles — Style presets, SCITEX/MATPLOTLIB, custom styles
- bundle — ZIP bundle format (spec.json + data.csv + exports)
- diagram — Box-and-arrow diagrams, Mermaid, Graphviz
- cli-reference — All CLI commands
- mcp-tools — MCP tool reference for AI agents
- return-fig — Convention: plotting functions must return fig
MCP Tools
| Tool | Purpose |
|---|---|
plt_plot | Create figure from declarative spec dict |
plt_reproduce | Reproduce figure from YAML recipe |
plt_compose | Compose multi-panel figure |
plt_crop | Crop whitespace from figure image |
plt_validate | Validate recipe reproducibility |
plt_extract_data | Extract plotted data arrays |
plt_info | Get recipe metadata |
plt_get_plot_types | List all supported plot types |
plt_list_styles | List available style presets |
plt_diagram_create | Create box-and-arrow diagram |
plt_diagram_render | Render diagram to image |
plt_diagram_compile_mermaid | Compile Mermaid diagram |
plt_diagram_compile_graphviz | Compile Graphviz diagram |
plt_diagram_list_presets | List diagram presets |
plt_line, plt_scatter, plt_bar, ... | Per-type plot tools |
CLI Summary
figrecipe plot spec.yaml # Create from spec
figrecipe reproduce recipe.yaml # Reproduce figure
figrecipe compose a.yaml b.yaml -o out.png # Compose panels
figrecipe crop figure.png # Crop whitespace
figrecipe validate recipe.yaml # Check reproducibility
figrecipe gui recipe.yaml # Launch GUI editor
figrecipe style list # List style presets
figrecipe diagram render flow.mmd # Render diagram
figrecipe mcp start # Start MCP server