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 Diagrams
      • Auto-Fix & Save Options
      • Shapes & Anchors
      • Diagram Validation Rules

User Guide

  • Terminology
    • Core Hierarchy
      • Figure
      • Axes
      • Axis
      • Plot
      • Panel
      • Canvas
      • Style
      • Recipe
    • Editor-Specific Terms
    • Common Confusions
  • 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
    • Figz
      • Figz.__init__()
      • Figz.create()
      • Figz.save()
      • Figz.add_panel()
      • Figz.add_panel_from_png()
      • Figz.remove_panel()
      • Figz.get_panel()
      • Figz.get_panel_pltz()
      • Figz.list_panel_ids()
      • Figz.get_panel_data()
      • Figz.render_preview()
    • Pltz
      • Pltz.__init__()
      • Pltz.from_png()
      • Pltz.create()
      • Pltz.get_preview()
      • Pltz.render_preview()
      • Pltz.save()
      • Pltz.update_preview()
      • Pltz.reproduce()
    • save_bundle()
    • load_bundle()
    • reproduce_bundle()
    • Diagram
      • Diagram.__init__()
      • Diagram.add_box()
      • Diagram.add_container()
      • Diagram.add_arrow()
      • Diagram.add_icon()
      • Diagram.validate_containers()
      • Diagram.validate_no_overlap()
      • Diagram.auto_layout()
      • Diagram._auto_box_height()
      • Diagram._finalize_canvas_size()
      • Diagram._get_anchor()
      • Diagram._auto_anchor()
      • Diagram.render()
      • Diagram.save()
      • Diagram.render_to_file()
      • Diagram.to_dict()
      • Diagram.from_dict()
    • signature()
    • Core Functions
    • Recording Classes
    • Style Management
    • Alignment Functions
    • GUI Editor
    • Diagram Class
      • Diagram
        • Diagram.__init__()
        • Diagram.add_box()
        • Diagram.add_container()
        • Diagram.add_arrow()
        • Diagram.add_icon()
        • Diagram.validate_containers()
        • Diagram.validate_no_overlap()
        • Diagram.auto_layout()
        • Diagram._auto_box_height()
        • Diagram._finalize_canvas_size()
        • Diagram._get_anchor()
        • Diagram._auto_anchor()
        • Diagram.render()
        • Diagram.save()
        • Diagram.render_to_file()
        • Diagram.to_dict()
        • Diagram.from_dict()
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.