Orchestrates matplotlib, seaborn, and plotly with opinionated publication styles to produce journal-ready figures. Use for multi-panel layouts, significance annotations, error bars, and colorblind-safe palettes.
Ships in alterlab-visualization. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Scientific visualization transforms data into clear, accurate figures for publication. Create journal-ready plots with multi-panel layouts, error bars, significance markers, and colorblind-safe palettes. Export as PDF/EPS/TIFF using matplotlib, seaborn, and plotly for manuscripts.
This skill should be used when:
| Scenario | Use Instead |
|---|---|
| Building a custom plot from scratch or tuning individual artists and rcParams | alterlab-matplotlib |
| Quick exploratory statistical plot (pair plot, distributions) to eyeball data | alterlab-seaborn |
| Interactive chart with hover/zoom or a web dashboard | alterlab-plotly |
| Proofing a finished figure: data fidelity, overlapping labels, 300-dpi export check | alterlab-figure-qa |
| Schematic, flowchart, or pathway diagram | alterlab-scientific-schematics |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-matplotlib) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
import matplotlib.pyplot as plt
import numpy as np
# Apply publication style (from scripts/style_presets.py)
from style_presets import apply_publication_style
apply_publication_style('default')
# Create figure with appropriate size (single column = 3.5 inches)
fig, ax = plt.subplots(figsize=(3.5, 2.5))
# Plot data
x = np.linspace(0, 10, 100)
ax.plot(x, np.sin(x), label='sin(x)')
ax.plot(x, np.cos(x), label='cos(x)')
# Proper labeling with units
ax.set_xlabel('Time (seconds)')
ax.set_ylabel('Amplitude (mV)')
ax.legend(frameon=False)
# Remove unnecessary spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
# Save in publication formats (from scripts/figure_export.py)
from figure_export import save_publication_figure
save_publication_figure(fig, 'figure1', formats=['pdf', 'png'], dpi=300)
Apply journal-specific styles using the matplotlib style files in assets/:
import matplotlib.pyplot as plt
# Option 1: Use style file directly
plt.style.use('assets/nature.mplstyle')
# Option 2: Use style_presets.py helper
from style_presets import configure_for_journal
configure_for_journal('nature', figure_width='single')
# Now create figures - they'll automatically match Nature specifications
fig, ax = plt.subplots()
# ... your plotting code ...
For statistical plots, use seaborn with publication styling:
import seaborn as sns
import matplotlib.pyplot as plt
from style_presets import apply_publication_style
# Apply publication style
apply_publication_style('default')
sns.set_theme(style='ticks', context='paper', font_scale=1.1)
sns.set_palette('colorblind')
# Create statistical comparison figure
fig, ax = plt.subplots(figsize=(3.5, 3))
# seaborn >=0.13: pass hue + legend=False to color by category
# (a bare palette= without hue= is deprecated, slated for removal in v0.14)
sns.boxplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'],
hue='treatment', palette='Set2', legend=False, ax=ax)
sns.stripplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'],
color='black', alpha=0.3, size=3, ax=ax)
ax.set_ylabel('Response (μM)')
sns.despine()
# Save figure
from figure_export import save_publication_figure
save_publication_figure(fig, 'treatment_comparison', formats=['pdf', 'png'], dpi=300)
Critical requirements (detailed in references/publication_guidelines.md):
Implementation:
# Use the figure_export.py script for correct settings
from figure_export import save_publication_figure
# Saves in multiple formats with proper DPI
save_publication_figure(fig, 'myfigure', formats=['pdf', 'png'], dpi=300)
# Or save for specific journal requirements
from figure_export import save_for_journal
save_for_journal(fig, 'figure1', journal='nature', figure_type='combination')
Always use colorblind-friendly palettes (detailed in references/color_palettes.md):
Recommended: Okabe-Ito palette (distinguishable by all types of color blindness):
# Option 1: Use assets/color_palettes.py
from color_palettes import OKABE_ITO_LIST, apply_palette
apply_palette('okabe_ito')
# Option 2: Manual specification
okabe_ito = ['#E69F00', '#56B4E9', '#009E73', '#F0E442',
'#0072B2', '#D55E00', '#CC79A7', '#000000']
plt.rcParams['axes.prop_cycle'] = plt.cycler(color=okabe_ito)
For heatmaps/continuous data:
viridis, plasma, cividisPuOr, RdBu, BrBG instead)jet or rainbow colormapsAlways test figures in grayscale to ensure interpretability.
Font guidelines (detailed in references/publication_guidelines.md):
Implementation:
# Set fonts globally
import matplotlib as mpl
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = ['Arial', 'Helvetica']
mpl.rcParams['font.size'] = 8
mpl.rcParams['axes.labelsize'] = 9
mpl.rcParams['xtick.labelsize'] = 7
mpl.rcParams['ytick.labelsize'] = 7
Journal-specific widths (detailed in references/journal_requirements.md):
Check figure size compliance:
from figure_export import check_figure_size
fig = plt.figure(figsize=(3.5, 3)) # 89 mm for Nature
check_figure_size(fig, journal='nature')
Best practices:
Example implementation (see references/matplotlib_examples.md for complete code):
from string import ascii_uppercase
fig = plt.figure(figsize=(7, 4))
gs = fig.add_gridspec(2, 2, hspace=0.4, wspace=0.4)
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[0, 1])
# ... create other panels ...
# Add panel labels
for i, ax in enumerate([ax1, ax2, ...]):
ax.text(-0.15, 1.05, ascii_uppercase[i], transform=ax.transAxes,
fontsize=10, fontweight='bold', va='top')
Step-by-step recipes — full code for each lives in references/common_tasks.md and references/matplotlib_examples.md:
GridSpec layout, consistent styling, bold panel labels.viridis) or colorblind-safe diverging (RdBu_r), labeled colorbar, grayscale test.configure_for_journal(...) then save_for_journal(...).Statistical rigor (always): error bars (SD/SEM/CI — state which in caption), sample size n, significance markers, individual data points where possible.
references/matplotlib_examples.md.references/seaborn_in_publications.md.fig.write_image('figure.png', scale=3) (~300 DPI), which needs kaleido >= 1 plus Chrome (run plotly_get_chrome once). See matplotlib_examples.md Example 8.Load these as needed for detailed information:
publication_guidelines.md: Comprehensive best practices
color_palettes.md: Color usage guide
journal_requirements.md: Journal-specific specifications
matplotlib_examples.md: Practical code examples
Use these helper scripts for automation:
figure_export.py: Export utilities
save_publication_figure(): Save in multiple formats with correct DPIsave_for_journal(): Use journal-specific requirements automaticallycheck_figure_size(): Verify dimensions meet journal specspython scripts/figure_export.py for examplesstyle_presets.py: Pre-configured styles
apply_publication_style(): Apply preset styles (default, nature, science, cell)set_color_palette(): Quick palette switchingconfigure_for_journal(): One-command journal configurationpython scripts/style_presets.py to see examplesUse these files in figures:
color_palettes.py: Importable color definitions
apply_palette() helper functionMatplotlib style files: Use with plt.style.use()
publication.mplstyle: General publication qualitynature.mplstyle: Nature journal specificationspresentation.mplstyle: Larger fonts for posters/slidesRecommended workflow for creating publication figures:
from style_presets import configure_for_journal
configure_for_journal('nature', 'single')
from figure_export import check_figure_size
check_figure_size(fig, journal='nature')
from figure_export import save_for_journal
save_for_journal(fig, 'figure1', 'nature', 'combination')
Before submitting figures, verify:
Use this skill to ensure scientific figures meet the highest publication standards while remaining accessible to all readers.
assets/color_palettes.py (opens in a new tab)assets/nature.mplstyle (opens in a new tab)assets/presentation.mplstyle (opens in a new tab)assets/publication.mplstyle (opens in a new tab)evals/evals.json (opens in a new tab)evals/fixtures/dose_response/dose_response.csv (opens in a new tab)evals/fixtures/dose_response/dose_response.png (opens in a new tab)evals/fixtures/dose_response/plot_dose_response.py (opens in a new tab)references/color_palettes.md (opens in a new tab)references/common_tasks.md (opens in a new tab)references/journal_requirements.md (opens in a new tab)references/matplotlib_examples.md (opens in a new tab)references/publication_guidelines.md (opens in a new tab)references/seaborn_in_publications.md (opens in a new tab)scripts/figure_export.py (opens in a new tab)scripts/style_presets.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/alterlab-visualization:alterlab-scientific-vizfrom alterlab-visualization
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-visualization9 skills in this plugin
/alterlab-figure-qaVerify publication figures with a render-then-check QA pass — data-fidelity against every underlying row, axis/label floor-and-ceiling legibility, bounding-box collision detection for overlapping text/markers, and 300-dpi print-readiness. Use when proofing or auditing a finished figure for correctness and print quality, catching mislabeled or overlapping elements, or confirming a plot faithfully represents its data before submission. For CREATING the plot prefer alterlab-matplotlib (or alterlab-seaborn / alterlab-plotly); for multi-panel publication layout prefer alterlab-scientific-viz; for schematic diagrams prefer alterlab-scientific-schematics. Part of the AlterLab Academic Skills suite./alterlab-generate-imageCreates and edits images for research communication with no API key — Claude draws illustrations, concept art, icons, backgrounds and slide/poster visuals as code (SVG, TikZ, matplotlib) rendered locally with exact, editable text, and edits existing images with Pillow (crop, annotate, scale bars, redaction, overlays). Photorealistic generation and AI edits (FLUX.2, Gemini 3.1 Flash Image via OpenRouter) are an optional extra with OPENROUTER_API_KEY. Use when the request is to generate or edit a photo, illustration, artwork, concept art, poster hero image, or presentation/slide visual asset — anything that is not a technical diagram, an infographic, or a data chart. For flowcharts, circuits, pathways, neural-net architectures, and technical/methodology diagrams use alterlab-scientific-schematics; for infographics that lay out statistics or timelines use alterlab-infographics; for plotting numeric data (scatter, bar, line) use alterlab-matplotlib instead. Part of the AlterLab Academic Skills suite./alterlab-infographicsCreates professional infographics with no API key: Claude lays the graphic out as code (SVG, with charts computed from the numbers), renders it locally to PNG/PDF with every word and figure exact, sources statistics with web search when asked, each tied to a citation, then reviews the render itself against a document-type quality threshold and iterates — 10 infographic types, 8 industry styles, colorblind-safe palettes. Optional AI raster generation (Nano Banana Pro, Gemini review, Perplexity research via OpenRouter) with OPENROUTER_API_KEY. Use when the request is for an infographic, data-story graphic, statistical poster, comparison chart, timeline, process/how-to visual, or list/social graphic that pairs a designed layout with figures. Use alterlab-scientific-schematics instead for technical flowcharts, CONSORT/PRISMA, pathways, or architecture diagrams; alterlab-generate-image for non-infographic illustrations; alterlab-matplotlib for exact plots of a dataset. Part of the AlterLab Academic Skills suite./alterlab-matplotlibBuilds plots with the matplotlib Python library (pyplot and the object-oriented Figure/Axes API) for full low-level customization, exporting to PNG/PDF/SVG. Use when fine-grained control over individual plot elements is needed — custom line/scatter/bar/histogram/heatmap/contour/box/violin/3D plots, rcParams and style-sheet tuning, or GridSpec subplot layouts inside a scientific Python workflow. Does NOT cover opinionated journal-ready multi-panel figure workflows (Nature/Science/Cell formatting, colorblind-safe palettes, significance annotations); for those prefer alterlab-scientific-viz instead. Part of the AlterLab Academic Skills suite./alterlab-mermaidWrites Markdown documents and text-based Mermaid diagrams (flowcharts, sequence, class, ER, gantt, state, and more) with full style guides, 24 diagram-type references, and 9 document templates. Use when a diagram or technical document should live as version-controllable Markdown/Mermaid text rather than a rendered image — READMEs, methods and pipeline diagrams, analysis or status reports, ADRs, and project docs that render natively on GitHub and GitLab. For AI-rendered publication schematics use alterlab-scientific-schematics; for manuscript prose use alterlab-scientific-writing; for plots of numeric data use alterlab-matplotlib. Part of the AlterLab Academic Skills suite./alterlab-plotlyBuilds INTERACTIVE charts with the Plotly Python library (plotly.express / graph_objects) — hover tooltips, zoom/pan, animations, rangesliders, 3D rotation, and standalone HTML/web-embeddable output. Use when a chart must be interactive or web-embedded, for dashboards (incl. Dash), exploratory data analysis, or rotatable 3D plots. For static publication figures defer to alterlab-matplotlib (or alterlab-scientific-viz for journal formatting); for static statistical charts (heatmaps, distributions) defer to alterlab-seaborn; for diagrams/schematics defer to alterlab-scientific-schematics or alterlab-mermaid. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job