scientific-plotting
/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.
- Author
- wugroup-xjtlu ↗
- Repository
- cc-skills-zhenghaowu-group ↗
- Licence
- Apache-2.0
- Last repository change
- 22.05.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 22.05.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/pubplot_style.py
What it does and when to use it
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.
Original author description
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 it works
- When this applies
- Quick start
- Decision tree
- What applystyle() does
- Loading order for references
- Boundary
SKILL.md preview
---
name: scientific-plotting
description: 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.
---
# Scientific Plotting (pubplot-style)
Generate publication-quality matplotlib figures using APS-derived styling.
Inspired by [pubplot](https://github.com/Chenghao-Wu/pubplot) but self-contained:
no `pubplot` package required.
## When this applies
Use when the user:
- Asks to plot data for a paper, thesis, or journal submission
- Says "publication quality", "make this plot look professional", or names a journal (APS, Nature, Science, IEEE, ACS)
- Builds matplotlib figures and asks for consistent styling across multiple plots
Skip for:
- Plotly, seaborn-only, bokeh, or dashboard work
- General matplotlib debugging unrelated to styling
- Data analysis without producing a figure
## Quick start
1. **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:
```bash
cp <skill>/scripts/pubplot_style.py ./pubplot_style.py
```
2. **In every plotting script, import and apply the style up front**
```python
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
```
3. **Build the plot using a recipe from `references/recipes.md`**
4. **Save as 300 DPI PNG**
```python
fig.savefig("figure.png", dpi=300, bbox_inches="tight")
```
## Decision tree
| 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` |
## What `apply_style()` does
- Font: Helvetica (fallback Arial / DejaVu Sans), 8pt base
- Figure size: 3.375" × 2.295" (single column, APS default)
- Inward ticks on all four sides, minor ticks visible
- Frameless legend, compact spacing
- Default color cycle: `BREWER_SET1` (8 colors + black)
- LaTeX rendering on by default with siunitx + Helvetica preamble
- Save defaults: 300 DPI PNG, `bbox_inches="tight"`
Pass `latex=False` for mathtext rendering when LaTeX is unavailable. Pass
`columns=2` for double-column figures.
## Loading order for references
Don't pre-load all reference files. Load them as needed:
- `references/recipes.md` — when picking a plot type
- `references/colors.md` — when choosing a colormap beyond the default cycler
- `references/customization.md` — when targeting a non-APS journal, switching LaTeX↔mathtext, or tweaking figure sizes
- `references/troubleshooting.md` — only when a specific error appears
## Boundary
This skill provides styling and recipes. It does NOT:
- Choose what data to plot
- Decide what story the figure tells
- Run statistical analysis
- Manage figure version control
Files in this package (6)
- SKILL.md 4 KB
- references/colors.md 2 KB
- references/customization.md 2 KB
- references/recipes.md 10 KB
- references/troubleshooting.md 2 KB
- scripts/pubplot_style.py 7 KB
Versions
The database has no other skills named scientific-plotting.
Database snapshot: 13.11.2026 · package version e816ea0bc75f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90matplotlib-scientific
Build publication-quality Matplotlib figures for scientific Python. Use when plotting experiment or analysis results, multi-panel figures, journal-sized layouts, tick formatting, legends (fancy/plain, placement, compact handles), point annotations, inset zooms, twin axes,… - 100scientific-figure-making
Generates publication-ready scientific figures in Python/matplotlib with consistent house style (Helvetica/Arial-like fonts, high-contrast palettes, minimal spines, frameless legends). Use when creating bar, trend, scatter, heatmap, or multi-panel figures for papers, slides, or… - 100visualization
Create publication-quality scientific figures and plots using Python (matplotlib, seaborn, plotly). Supports bar charts, scatter plots, heatmaps, box plots, violin plots, survival curves, network graphs, and more. Use when user asks to plot data, create figures, make charts,… - 100matplotlib
Low-level plotting library for full customization. Use when you need fine-grained control over every plot element, creating novel plot types, or integrating with specific scientific workflows. Export to PNG/PDF/SVG for publication. For quick statistical plots use seaborn; for… - 100alterlab-scientific-viz
Orchestrates matplotlib, seaborn, and plotly with opinionated publication styles to produce journal-ready figures. Use when preparing journal-submission figures that need multi-panel layouts with bold panel labels, statistical significance annotations, error bars,… - 95paper-figure-nature
Generate publication-ready matplotlib figures matching Nature journal standards. Use when user says 'Nature figure', 'publication figure', or asks for journal-grade plots.