From scientific-plotting
Use when creating publication-quality matplotlib figures in Python — scientific line plots, scatter, error bars, heatmaps, contour, bar, histogram, 3D, multi-panel, log-scale, twin/inset axes, and colorbars. Applies APS journal styling (Helvetica, 8pt, inward ticks, brewer_set1 palette) with mathtext fallback when LaTeX isn't installed. Saves figures as 300 DPI PNG. Customization guidance for Nature, Science, IEEE column widths and fonts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/scientific-plotting:scientific-plottingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate publication-quality matplotlib figures using APS-derived styling.
Generate publication-quality matplotlib figures using APS-derived styling.
Inspired by pubplot but self-contained:
no pubplot package required.
Use when the user:
Skip for:
Copy the bundled module into the user's project root
The file scripts/pubplot_style.py (in this skill directory) is a drop-in
module. Copy it to wherever the user's plotting scripts live:
cp <skill>/scripts/pubplot_style.py ./pubplot_style.py
In every plotting script, import and apply the style up front
import matplotlib.pyplot as plt
import numpy as np
from pubplot_style import apply_style, linestyle_generator
apply_style() # APS defaults, LaTeX on, single-column figure
# apply_style(latex=False) # if LaTeX isn't installed
# apply_style(columns=2) # for a 6.75"-wide double-column figure
Build the plot using a recipe from references/recipes.md
Save as 300 DPI PNG
fig.savefig("figure.png", dpi=300, bbox_inches="tight")
| User wants | Read |
|---|---|
| Single line or multiple curves to distinguish | references/recipes.md § Line / Multi-curve |
| Scatter / error bars / shaded bands | references/recipes.md § Scatter, Errorbar |
| Heatmap or 2D field | references/recipes.md § Heatmap; references/colors.md for colormap choice |
| Bar, histogram, violin, box | references/recipes.md § Bar / Hist / Violin |
| Contour or 3D | references/recipes.md § Contour / 3D |
| Multi-panel figure with subplot labels | references/recipes.md § Multi-panel |
| Log-scale axes, twin axes, inset axes | references/recipes.md § Log-scale, Twin/Inset |
| Match Nature / Science / IEEE / ACS sizing | references/customization.md |
| Switch LaTeX ↔ mathtext, or LaTeX errors | references/customization.md § LaTeX, then troubleshooting.md |
| Any rendering error | references/troubleshooting.md |
apply_style() doesBREWER_SET1 (8 colors + black)bbox_inches="tight"Pass latex=False for mathtext rendering when LaTeX is unavailable. Pass
columns=2 for double-column figures.
Don't pre-load all reference files. Load them as needed:
references/recipes.md — when picking a plot typereferences/colors.md — when choosing a colormap beyond the default cyclerreferences/customization.md — when targeting a non-APS journal, switching LaTeX↔mathtext, or tweaking figure sizesreferences/troubleshooting.md — only when a specific error appearsThis skill provides styling and recipes. It does NOT:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub wugroup-xjtlu/cc-skills-zhenghaowu-group --plugin scientific-plotting