Figure planner

From Boom5426/Nature-Paper-Skills · View interactive version

Figure planner is an AI agent skill from the GitHub repository Boom5426/Nature-Paper-Skills. Use when designing, restructuring, or auditing manuscript figures and you need to define one main claim per figure, assign panel roles, align legends with the text, or decide what belongs in main figures versus supplement.

How to use this skill

Skill file

Figure Planner

Overview

Use this skill when the bottleneck is no longer sentence writing but figure logic. The goal is to make each figure carry a defensible scientific job, keep the panel set coherent, and ensure that the legend and Results text tell the same story.

This skill is narrower than manuscript-optimizer. Use manuscript-optimizer when the whole paper structure is unstable. Use figure-planner when the central issue is what each figure should prove and how each panel should function.

When To Use

Use this skill when:

Do not use this skill for:

Core Rule

Each main figure should earn its place by carrying one dominant claim.

If a figure cannot be summarized by one clean sentence, either:

Panel Roles

Assign each panel one primary role before writing the legend or Results paragraph:

Do not let one panel pretend to do three jobs at once.

Planning Order

  1. Write the single-sentence claim of the figure.
  2. List the minimum panels needed to support that claim.
  3. Assign each panel one role.
  4. Decide which panel is the anchor panel:
  1. Move secondary detail to:
  1. Rewrite the figure title and legend to match the actual claim.
  2. Check that the Results subsection matches the same panel logic.

Main Figure Versus Supplement

Keep in the main figure:

Move to the supplement:

pass a check): an SI table or one Methods sentence. They explain why a bar is missing; a main panel

answers a scientific question

Legend Rules

Legends should do more than decode axes.

Each legend should:

compared"); state the fact that sets comparability instead (a different panel, a different n)

inclusion-exclusion overlap can be slightly negative)

Figure Arc

Across a paper, Figure 1 renders the paper's one-sentence pitch as data: scope, not architecture.

Later figures carry mechanism, evidence, robustness and application. Judge each panel against the

paper's pitch as well as its own figure's claim, and move content between figures when that is where

the story needs it. figure-style rule 7.5 points here (figure-style is part of the figure stack,

installed with --figure).

Visual Hygiene Pass

After the figure logic is stable, run one visual-hygiene pass:

Common Failure Modes

Nature-Style Enhancements

Matplotlib Figure Standards

For figures targeting Nature or similar high-impact journals, apply the following rcParams:

import matplotlib.pyplot as plt

MM = 1 / 25.4

plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Arial']
plt.rcParams['svg.fonttype'] = 'none'          # editable text in SVG
plt.rcParams['pdf.fonttype'] = 42              # editable TrueType text in PDF
plt.rcParams['font.size'] = 7                  # 5-7 pt at final printed size
plt.rcParams['axes.spines.right'] = False
plt.rcParams['axes.spines.top'] = False
plt.rcParams['axes.linewidth'] = 0.8           # 0.75-1 pt at final printed size
plt.rcParams['legend.frameon'] = False

fig = plt.figure(figsize=(89 * MM, 60 * MM))   # single column; 183 mm double

Use text.usetex = True only when LaTeX is installed and math-rich labels are required.

Print scale versus design scale

The numbers above are print scale: the canvas is the printed panel, so every

size is the size the reader sees. This is the default and the safer regime.

You will also meet figures authored at design scale, where the canvas is S

times the printed width and the export is downscaled into the column. A common

choice is S around 4, which turns font.size = 24 into 6.1 pt on the page and

axes.linewidth = 3 into 0.76 pt. Those values are legal, but only after the

division. Two rules follow:

every absolute size by it.

and export vector, because a downscaled PNG of a bar chart is a raster of

something that should have stayed a vector.

Nature-Style Palette

When a figure needs a fixed, print-friendly palette, this warm Nature-style set works well for Nature Communications and similar journals. Give the baseline or reference series terracotta, then walk down the list for the remaining categories, keeping one category in one color family:

#C96144  terracotta (baseline / reference)   #99C290  light green
#E99D4E  amber                                #C0BEDC  light purple
#5185C0  blue                                 #8EA9D4  light blue
#8281B9  purple                               #F2CB9F  light amber
#55966B  green                                #99AABB  grey-blue
#FFB3C1  pink        #FFD3E0  light pink       #87CEEB  sky blue
NATURE_PALETTE = [
    "#C96144", "#E99D4E", "#5185C0", "#8281B9", "#55966B",
    "#99C290", "#C0BEDC", "#8EA9D4", "#F2CB9F", "#99AABB",
    "#FFB3C1", "#FFD3E0", "#87CEEB",
]

def nature_assign(labels, baseline=None):
    """Map labels to palette colors, one distinct color per label.

    The baseline/reference series gets terracotta and the rest walk the palette
    in order. Raises rather than reusing a color: two series sharing one color
    silently breaks the figure's color threading.
    """
    has_baseline = baseline is not None and baseline in labels
    available = NATURE_PALETTE[1:] if has_baseline else NATURE_PALETTE
    others = [label for label in labels if label != baseline]
    if len(others) > len(available):
        raise ValueError(
            f"{len(others)} series but only {len(available)} distinct colors "
            "available; group related series into one color family, or move "
            "some of them to a separate panel"
        )
    result, idx = {}, 0
    for label in labels:
        if has_baseline and label == baseline:
            result[label] = NATURE_PALETTE[0]
        else:
            result[label] = available[idx]
            idx += 1
    return result

When to Use

Output Standard

When using this skill, produce:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.