← ClaudeAtlas

xkcd-pylisted

Generate a Python matplotlib plot script following the user's mandatory xkcd style — `with plt.xkcd():` context, `pparam = dict(...)` axis-config, raw-string LaTeX labels, wide canvas (`figsize=(10, 6)`), `dpi=300` savefig. Supports parquet / CSV / NumPy (`.npy`, `.npz`) and four variants: single line, multi-line + legend, scatter / errorbar, multi-panel subplots. Writes the `.py` only — does NOT execute it; the user runs it (typically `uv run`). Use when asked to write an xkcd-style / hand-drawn / sketch-style matplotlib script, plot data in xkcd style from parquet / CSV / `.npy`, scaffold an xkcd line / scatter / errorbar / subplot script, or match the lab's xkcd template. Triggers on: xkcd plot, xkcd matplotlib, xkcd style, hand-drawn / sketch plot, plt.xkcd, comic-style plot; xkcd 플롯, xkcd 그래프, 손그림 그래프, 스케치 스타일 플롯, xkcd 스크립트, xkcd 코드.
Axect/skills · ★ 3 · AI & Automation · score 76
Install: claude install-skill Axect/skills
# xkcd-py — Matplotlib Script Generator (xkcd / hand-drawn style) Generate a Python plotting script that **always** follows the user's lab xkcd template. The skill writes a `.py` file and returns its path; it does not run the script. The user executes it themselves (preferred: `uv run <path>` per their global preferences). The canonical template lives at `~/Socialst/Templates/PyPlot_Template/xkcd_plot.py`. Every variant in this skill is a structural extension of that file, normalized to the same `pparam` + ax-object pattern as `scienceplot-py`. ## Mandatory style invariants Every generated script MUST keep these load-bearing patterns intact. Do not "clean up" any of them. 1. **xkcd context block** — all plotting (and `savefig`) lives inside `with plt.xkcd():`. Never substitute `plt.rcParams.update(...)` or call any plotting outside this block; once the `with` exits, rcParams are restored and a later `savefig` will lose the xkcd fonts. 2. **`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. 3. **`ax.autoscale(tight=True)`** — called on every axis, before `ax.set(**pparam)`. For subplots, loop over all axes. 4. **Raw-string LaTeX** — every label, title, legend entry uses `r'...'`. xkcd uses matplotlib's `mathtext` for `$...$` blocks (not real LaTeX); raw strings still matter the moment a backslash appears. 5. **figsize