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

ToolPurpose
plt_plotCreate figure from declarative spec dict
plt_reproduceReproduce figure from YAML recipe
plt_composeCompose multi-panel figure
plt_cropCrop whitespace from figure image
plt_validateValidate recipe reproducibility
plt_extract_dataExtract plotted data arrays
plt_infoGet recipe metadata
plt_get_plot_typesList all supported plot types
plt_list_stylesList available style presets
plt_diagram_createCreate box-and-arrow diagram
plt_diagram_renderRender diagram to image
plt_diagram_compile_mermaidCompile Mermaid diagram
plt_diagram_compile_graphvizCompile Graphviz diagram
plt_diagram_list_presetsList 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