scienceplot-pylisted
Install: claude install-skill Axect/skills
# scienceplot-py — Matplotlib Plot + Figure Generator (scienceplots / science+nature)
Generate a Python plotting script that **always** follows the user's lab
template shape, execute it, and verify the rendered figure artifact. The skill
returns both the `.py` path and the generated figure path(s). The default
workflow is script plus figure generation; use script-only mode only when the
user explicitly requests a script without execution.
The canonical template lives at
`~/Socialst/Templates/PyPlot_Template/pq_plot.py`. Every variant in this
skill is a structural extension of that file.
## Mandatory style invariants
Every generated script MUST keep these load-bearing patterns intact. Do not
"clean up" any of them, even if they look redundant or unused.
1. **`import scienceplots`** — required. It registers the `science` and
`nature` styles by import side-effect; the symbol is never referenced
directly. Linters will flag it as unused — keep it anyway.
2. **Style context block** — all plotting code lives inside
`with plt.style.context(["science", "nature"]):`. Never substitute
`plt.style.use(...)` or call any plotting outside this block.
3. **`pparam` dict** — axis configuration is a dict, applied with
`ax.set(**pparam)`. Do not inline `ax.set_xlabel(...)`, `set_ylabel(...)`,
`set_title(...)` calls when `pparam` would do.
4. **`ax.autoscale(tight=True)`** — called on every axis, before
`ax.set(**pparam)`. For subplots, loop over all axes.
5. **Raw-strin