# scientific-visualization

> Meta-skill for publication-ready figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell) by orchestrating matplotlib, seaborn, and plotly.

**Use case**: Produce journal-formatted multi-panel publication figures

**Canonical URL**: https://agentcookbooks.com/skills/scientific-visualization/

**Topics**: claude-code, skills, science, scientific-writing

**Trigger phrases**: "make a publication figure", "format for Nature style", "multi-panel figure", "journal-ready plot", "add significance annotations"

**Source**: [K-Dense AI](https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/scientific-visualization)

**License**: MIT

---

## What it does

`scientific-visualization` is a Claude Code skill from K-Dense AI's [scientific-agent-skills repo](https://github.com/K-Dense-AI/scientific-agent-skills). It turns Claude into a publication figure specialist that orchestrates `matplotlib`, `seaborn`, and `plotly` to produce multi-panel figures meeting specific journal requirements — Nature, Science, Cell, and others — with correct font sizes, colorblind-safe palettes, significance bars, error bars, and figure dimensions.

A session produces Python code that generates a figure to spec: the code handles subplot layout, styling, annotation, and export at the correct DPI and file format for the target journal's submission system.

## When to use it

Reach for it when:

- You have data ready and need a figure that will pass journal technical requirements without revision requests
- You're building a multi-panel figure (A/B/C/D panels) and need consistent styling across panels
- You need colorblind-accessible color schemes with significance annotations applied correctly

When *not* to reach for it:

- Quick exploratory data visualization — use `seaborn` or `matplotlib` directly
- Structural diagrams and flowcharts — use `scientific-schematics`

## Install

Copy the `SKILL.md` from K-Dense AI's [scientific-visualization folder](https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/scientific-visualization) into `.claude/skills/scientific-visualization/` in your project.

Trigger phrases: "make a publication figure", "format for Nature style", "multi-panel figure", "journal-ready plot".

## What a session looks like

A typical session has three phases:

1. **Journal and figure specification.** Specify the target journal and figure type. Claude retrieves the journal's figure guidelines (column width, DPI, font size, color mode) and proposes a panel layout.
2. **Code generation.** Claude writes matplotlib/seaborn code with publication styling: Helvetica or Arial fonts at correct point sizes, colorblind-safe palette, significance annotation for statistical comparisons, and tight layout for multi-panel figures.
3. **Export and validation.** The figure is saved at the correct DPI and format (TIFF/EPS/PDF), and the code includes a dimension check that warns if output size doesn't match journal requirements.

## Receipts

**Where it works well:**
- Cell-style violin plots with overlaid jitter and significance bars — the styling code is comprehensive and the output passes technical review without manual adjustment
- Colorblind-safe palette enforcement — Claude applies Wong or Okabe-Ito palettes consistently rather than defaulting to red/green

**Where it backfires:**
- Journals with proprietary style templates or EPS-specific font embedding requirements may need manual post-processing
- The skill generates code, not rendered figures; if your data doesn't match the assumed format, you'll need to adjust the data-loading step

**Pattern that works:** provide a small sample dataset (5–10 rows) alongside the figure request so Claude can write data-loading code that matches your actual structure rather than using placeholder arrays.

## Source and attribution

Originally authored by [K-Dense Inc.](https://github.com/K-Dense-AI). The canonical SKILL.md lives in the [`scientific-visualization` folder](https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/scientific-visualization) of their public scientific-agent-skills repository.

License: MIT. Install, adapt, and redistribute with attribution preserved.

This page documents the skill from a practitioner's perspective. For the formal spec and any updates, defer to the source repo.