← ClaudeAtlas

xkcd-pylisted

Generate a Python matplotlib plot script that follows the user's mandatory xkcd style — `with plt.xkcd():` context, the `pparam = dict(...)` axis-config pattern, raw-string LaTeX labels, wide xkcd-canvas (`figsize=(10, 6)`), and `dpi=300` savefig. Supports parquet, CSV, and NumPy (`.npy` / `.npz`) data sources, and four plot variants: single line, multi-line + legend, scatter / errorbar, and multi-panel subplots. Produces the `.py` file only — does NOT execute it. The user runs it themselves (typically with `uv run`). Use when the user asks to: write an xkcd-style matplotlib script, draft a hand-drawn / sketch-style figure, plot data in xkcd style from parquet / CSV / `.npy`, scaffold a quick xkcd line / scatter / errorbar / subplot script, or set up an xkcd plot matching their lab template. Triggers on: "xkcd plot", "xkcd matplotlib", "xkcd style", "hand-drawn plot", "sketch plot", "plt.xkcd", "comic style plot", "xkcd 플롯", "xkcd 그래프", "손그림 그래프", "스케치 스타일 플롯", "xkcd 스크립트", "xkcd 코드".
Axect/skills · ★ 2 · AI & Automation · score 78
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