FigRecipe

Getting Started

  • Installation
    • Basic Installation
    • Full Installation
    • Individual Extras
    • Development Installation
    • Requirements
  • Quick Start
    • Creating Your First Reproducible Figure
    • Bundle Format (Recommended for Sharing)
    • Saving Figures
    • Output Files
    • Reproducing a Figure
    • CLI Commands
    • MCP Server for AI Agents
    • Statistical Annotations
    • Multi-Panel Composition
    • Box-and-Arrow Schematics
      • Schematic Validation Rules

User Guide

  • Plot Gallery
    • Basic Plots
      • Line Plot
      • Scatter Plot
      • Bar Plot
    • Statistical Plots
      • Histogram
      • Box Plot
      • Violin Plot
    • 2D Plots
      • Heatmap / Imshow
      • Contour Plot
    • Supported Plot Types (47)
    • CSV Column Workflow
    • Statistical Annotations
  • Style Reference
    • Style Anatomy
    • Style Parameters
      • Figure Settings
      • Axes Settings
      • Labels and Title
      • Ticks
      • Lines and Markers
      • Legend
      • Spines
      • Grid
    • Loading Styles
      • Python API
      • Available Presets
      • Custom Styles
  • CLI Reference
    • Usage
    • Figure Creation
      • plot
      • reproduce
      • compose
      • gui
    • Image Processing
      • convert
      • crop
      • diff
      • hitmap
    • Data & Validation
      • extract
      • validate
      • info
    • Diagram
      • diagram
    • Style & Appearance
      • style
      • fonts
    • Integration
      • mcp
      • list-python-apis
    • Utility
      • completion
      • version
  • MCP Specification Format
    • Starting the MCP Server
    • Basic Specification Structure
    • Plot Types
      • Line Plot
      • Scatter Plot
      • Bar Plot
      • Histogram
      • Box Plot
      • Violin Plot
      • Image/Heatmap
      • Contour Plot
      • Fill Between
      • Error Bar
    • CSV Data Input
    • Statistical Annotations
    • Multi-Panel Figures
      • Using Axes Array
    • MCP Tool Reference
      • plt_plot
      • plt_reproduce
      • plt_compose
      • plt_info
      • plt_validate
      • plt_crop
      • plt_extract_data
      • plt_list_styles
      • plt_get_plot_types
    • Diagram Tools
      • diagram_create
      • diagram_render
      • diagram_compile_mermaid
      • diagram_compile_graphviz
      • diagram_list_presets
      • diagram_get_backends
    • All MCP Tools Summary

API Reference

  • FigRecipe API Reference
    • Usage
    • subplots()
    • save()
    • reproduce()
    • load()
    • compose()
    • align_panels()
    • distribute_panels()
    • align_smart()
    • gui()
    • crop()
    • info()
    • validate()
    • extract_data()
    • save_bundle()
    • load_bundle()
    • reproduce_bundle()
    • load_style()
    • unload_style()
    • list_presets()
    • get_graph_preset()
    • list_graph_presets()
    • register_graph_preset()
    • Diagram
      • Diagram.__init__()
      • Diagram._parse_mermaid()
      • Diagram.add_edge()
      • Diagram.add_node()
      • Diagram.emphasize()
      • Diagram.from_dict()
      • Diagram.from_mermaid()
      • Diagram.from_yaml()
      • Diagram.render()
      • Diagram.set_group()
      • Diagram.split()
      • Diagram.to_graphviz()
      • Diagram.to_mermaid()
      • Diagram.to_yaml()
    • Schematic
      • Schematic.__init__()
      • Schematic._auto_anchor()
      • Schematic._get_anchor()
      • Schematic._render_arrow()
      • Schematic._render_box()
      • Schematic._render_container()
      • Schematic.add_arrow()
      • Schematic.add_box()
      • Schematic.add_container()
      • Schematic.auto_layout()
      • Schematic.from_dict()
      • Schematic.render()
      • Schematic.render_to_file()
      • Schematic.to_dict()
      • Schematic.validate_containers()
      • Schematic.validate_no_overlap()
    • _get_sns()
    • _get_version()
    • _rebrand_text()
    • Core Functions
      • subplots()
      • save()
      • reproduce()
      • compose()
      • validate()
      • crop()
      • info()
      • extract_data()
    • Recording Classes
      • RecordingFigure
        • RecordingFigure.__init__()
        • RecordingFigure.fig
        • RecordingFigure.axes
        • RecordingFigure.flat
        • RecordingFigure.record
        • RecordingFigure._get_style_fontsize()
        • RecordingFigure._get_theme_text_color()
        • RecordingFigure.suptitle()
        • RecordingFigure.supxlabel()
        • RecordingFigure.supylabel()
        • RecordingFigure.colorbar()
        • RecordingFigure.add_panel_labels()
        • RecordingFigure.set_title_metadata()
        • RecordingFigure.set_caption()
        • RecordingFigure.title_metadata
        • RecordingFigure.caption
        • RecordingFigure.set_stats()
        • RecordingFigure.stats
        • RecordingFigure.generate_caption()
        • RecordingFigure.__getattr__()
        • RecordingFigure.savefig()
        • RecordingFigure.save_recipe()
      • RecordingAxes
        • RecordingAxes.__init__()
        • RecordingAxes.ax
        • RecordingAxes.position
        • RecordingAxes.__getattr__()
        • RecordingAxes.__dir__()
        • RecordingAxes._create_recording_wrapper()
        • RecordingAxes._create_bar_wrapper()
        • RecordingAxes._create_boxplot_wrapper()
        • RecordingAxes._create_stem_wrapper()
        • RecordingAxes._create_legend_wrapper()
        • RecordingAxes.set_caption()
        • RecordingAxes.panel_caption
        • RecordingAxes.set_stats()
        • RecordingAxes.stats
        • RecordingAxes._no_record()
        • RecordingAxes._record_seaborn_call()
        • RecordingAxes.figure
        • RecordingAxes.xaxis
        • RecordingAxes.yaxis
        • RecordingAxes.get_xlim()
        • RecordingAxes.get_ylim()
        • RecordingAxes.get_xlabel()
        • RecordingAxes.get_ylabel()
        • RecordingAxes.get_title()
        • RecordingAxes.caption
        • RecordingAxes.generate_panel_caption()
    • Style Management
      • load_style()
      • unload_style()
      • list_presets()
    • Alignment Functions
      • align_panels()
      • align_smart()
      • distribute_panels()
    • GUI Editor
      • gui()
    • Diagram Class
      • Diagram
        • Diagram.__init__()
        • Diagram.from_yaml()
        • Diagram.from_dict()
        • Diagram.from_mermaid()
        • Diagram._parse_mermaid()
        • Diagram.add_node()
        • Diagram.add_edge()
        • Diagram.set_group()
        • Diagram.emphasize()
        • Diagram.to_mermaid()
        • Diagram.to_graphviz()
        • Diagram.render()
        • Diagram.to_yaml()
        • Diagram.split()
FigRecipe
  • Plot Gallery
  • Edit on GitHub

Plot Gallery

FigRecipe supports all standard matplotlib plot types. Below are examples of each plot type with the declarative specification format used by the MCP server.

Basic Plots

Line Plot

Line Plot

Line plot with multiple series.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
x = np.linspace(0, 10, 100)
ax.plot(x, np.sin(x), label="sin(x)", id="sine")
ax.plot(x, np.cos(x), label="cos(x)", id="cosine")
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.legend()
fr.save(fig, "line_plot.png")

MCP Specification:

figure:
  figsize: [6, 4]
plots:
  - type: line
    x: [0, 1, 2, 3, 4, 5]
    y: [0, 1, 4, 9, 16, 25]
    label: "quadratic"
xlabel: "X"
ylabel: "Y"
title: "Line Plot"

Scatter Plot

Scatter Plot

Scatter plot with color mapping.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
np.random.seed(42)
x = np.random.randn(50)
y = x + np.random.randn(50) * 0.5
ax.scatter(x, y, c=x, cmap="viridis", s=50, id="data")
ax.set_xlabel("X")
ax.set_ylabel("Y")
fr.save(fig, "scatter_plot.png")

MCP Specification:

plots:
  - type: scatter
    x: [1, 2, 3, 4, 5]
    y: [2, 4, 1, 5, 3]
    c: [0.1, 0.3, 0.5, 0.7, 0.9]
    cmap: viridis
    s: 50
xlabel: "X"
ylabel: "Y"

Bar Plot

Bar Plot

Vertical bar plot.

import figrecipe as fr

fig, ax = fr.subplots()
categories = ["A", "B", "C", "D", "E"]
values = [23, 45, 12, 67, 34]
ax.bar(categories, values, color="steelblue", id="bars")
ax.set_xlabel("Category")
ax.set_ylabel("Value")
fr.save(fig, "bar_plot.png")

MCP Specification:

plots:
  - type: bar
    x: ["A", "B", "C", "D"]
    height: [10, 20, 15, 25]
    color: steelblue
xlabel: "Category"
ylabel: "Value"

Statistical Plots

Histogram

Histogram

Histogram showing data distribution.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
np.random.seed(42)
data = np.random.randn(1000)
ax.hist(data, bins=30, alpha=0.7, color="steelblue", edgecolor="white", id="hist")
ax.set_xlabel("Value")
ax.set_ylabel("Frequency")
fr.save(fig, "histogram.png")

Box Plot

Box Plot

Box plot comparing distributions.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
np.random.seed(42)
data = [np.random.randn(100) + i for i in range(4)]
ax.boxplot(data, labels=["A", "B", "C", "D"], id="boxplot")
ax.set_xlabel("Group")
ax.set_ylabel("Value")
fr.save(fig, "boxplot.png")

Violin Plot

Violin Plot

Violin plot showing distribution shape.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
np.random.seed(42)
data = [np.random.randn(100) + i for i in range(4)]
ax.violinplot(data, positions=[1, 2, 3, 4], id="violin")
ax.set_xticks([1, 2, 3, 4])
ax.set_xticklabels(["A", "B", "C", "D"])
fr.save(fig, "violinplot.png")

2D Plots

Heatmap / Imshow

Heatmap

Heatmap visualization of 2D data.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
np.random.seed(42)
data = np.random.randn(10, 10)
im = ax.imshow(data, cmap="coolwarm", id="heatmap")
fig.fig.colorbar(im, ax=ax._ax)
fr.save(fig, "heatmap.png")

Contour Plot

Contour Plot

Filled contour plot.

import figrecipe as fr
import numpy as np

fig, ax = fr.subplots()
x = np.linspace(-3, 3, 100)
y = np.linspace(-3, 3, 100)
X, Y = np.meshgrid(x, y)
Z = np.sin(X) * np.cos(Y)
cs = ax.contourf(X, Y, Z, levels=20, cmap="viridis", id="contour")
fig.fig.colorbar(cs, ax=ax._ax)
fr.save(fig, "contour.png")

Supported Plot Types (47)

FigRecipe supports all standard matplotlib axes methods:

Line & Curve: plot, step, fill, fill_between, fill_betweenx, errorbar, stackplot, stairs

Scatter & Points: scatter

Bar & Categorical: bar, barh

Distribution: hist, hist2d, boxplot, violinplot, ecdf

2D Image & Matrix: imshow, matshow, pcolor, pcolormesh, hexbin, spy

Contour & Surface: contour, contourf, tricontour, tricontourf, tripcolor, triplot

Spectral & Signal: specgram, psd, csd, cohere, angle_spectrum, magnitude_spectrum, phase_spectrum, acorr, xcorr

Vector & Flow: quiver, barbs, streamplot

Special: pie, stem, eventplot, loglog, semilogx, semilogy, graph

CSV Column Workflow

FigRecipe can read data directly from CSV files:

plots:
  - type: scatter
    data_file: "experiment_data.csv"
    x_column: "time_seconds"
    y_column: "signal_amplitude"
    label: "Experiment 1"

xlabel: "Time (s)"
ylabel: "Amplitude"

Statistical Annotations

Add significance brackets with p-values:

stat_annotations:
  - group1_idx: 0
    group2_idx: 1
    p_value: 0.003
    test: "t-test"
    stars: true
Previous Next

© Copyright 2026, Yusuke Watanabe.

Built with Sphinx using a theme provided by Read the Docs.