---
name: figure-design-patterns
description: Established figure and table patterns for ML / computational biology papers. Loaded by writing-brainstormer to ground figure suggestions in conventional patterns rather than improvising. Includes references to type-specific guides.
---

# Figure & Table Design Patterns

This skill provides a vocabulary of established figure types for ML / computational biology papers. When suggesting visualizations, default to these patterns. Deviations should be justified.

## When to Use Which Figure Type

| Situation | Default figure | Alternative | Anti-pattern |
|-----------|---------------|-------------|--------------|
| Compare 3-10 models on 1 metric | Bar chart with error bars | Dot plot | Pie chart |
| Compare N models on M tasks (N,M > 4) | Heatmap | Multi-panel bar | Stacked bar |
| Show distribution of a quantity | Box plot or violin | Histogram | Mean ± SD bar (hides shape) |
| Compare 2 quantities across items | Scatter plot | Slopegraph | Two parallel bars |
| Show ranking stability across conditions | Critical Difference (CD) diagram | Bumpchart | Multiple bar charts |
| Show learning over training | Line plot with shaded CI | Step plot | Bar per epoch |
| Show a process / pipeline | Schematic diagram | Flowchart | Wall of text |
| Compare full-distribution forecasts | Forest plot | Caterpillar plot | Mean-only bar |
| Show 2D embedding structure | Scatter colored by category | Hexbin if dense | 3D rotation |
| Show time × condition × value | Faceted line plots | Heatmap with time on x-axis | Animated GIF |

## Table Type Patterns

| Situation | Default table | Notes |
|-----------|---------------|-------|
| Main results, N methods × M metrics | Bold best per column, underline second | Add std as ±x.xx or in parens |
| Ablation, removing components | Each row removes one component, last row = full | Mark significance vs. full |
| Dataset statistics | Group by attribute (size, splits, source) | Header rows with categories |
| Hyperparameters / configs | Method on rows, hyperparam on columns | OK to put in appendix |
| Qualitative comparison of methods | Methods on rows, properties (✓/✗/partial) on columns | Use for related work surveys |

## References

For deeper guidance on specific figure categories, see:
- `references/ablation-table-templates.md` — patterns for ablation tables
- `references/statistical-figures.md` — significance, CIs, effect sizes
- `references/benchmark-paper-figures.md` — patterns specific to benchmark papers (CD diagrams, rank stability, etc.)

## General Principles

1. **One message per figure.** If you can't state the message in one sentence, split the figure.
2. **Show distributions, not just means.** Box plots beat bar-of-mean plots for revealing what's actually happening.
3. **Color sparingly and meaningfully.** Categorical color for categorical variables; sequential for ordered; diverging for signed deltas. Never decorative.
4. **Direct labels beat legends.** When possible, label lines/bars directly on the plot.
5. **Don't sacrifice precision for prettiness.** A clean Matplotlib figure beats a pretty Seaborn figure that hides outliers.
6. **Captions tell the story, axes report the data.** Caption answers "what should I take away?", axes answer "what am I looking at?".

## When Suggesting Figures, Brainstormer Should

1. State the message in one sentence
2. Pick the default figure type from the table above
3. Mention 1-2 alternatives if the default has caveats
4. Flag if the data isn't ready (e.g., "needs CIs computed", "needs N>3 seeds")
5. Suggest where in the paper structure the figure should live
