mathmodel-figure-templates
About mathmodel-figure-templates
MathModel Figure Templates is a skill for the LaTeX sandbox, containing runnable Python/matplotlib figure scripts. It renders figures by template ID and provides PNG, PDF, and SVG outputs along with the copied script.
Key features
- 01Bundle Python/matplotlib figure scripts
- 02Render figures by template ID
- 03List available template IDs
- 04Export PNG, PDF, and SVG
Use cases
- 01Choose a figure template from the catalog
- 02Generate figures in multiple formats
- 03Customize a copied script in the workspace
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ jihe520/ mathmodelagent --skill mathmodel-figure-templatesAfter installing, type/mathmodel-figure-templatesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/figure-catalog.mdplot-recipes.mdscripts/render_template.pyscripts/templates/make_correlation_pairgrid.pymake_cv_roc_ci.pymake_grouped_circular_heatmap.pymake_grouped_corr_split_violin.pymake_multiclass_shap_combo.pymake_nature_chord_diagram.pymake_paired_raincloud.pymake_prediction_marginal_grid.pymake_rf_tpe_surface.pymake_taylor_diagram.pymake_urban_park_cooling_combo.pyDetails
From the project READMEMathModel Figure Templates
This skill is bundled into the LaTeX sandbox at /home/user/.claude/skills/mathmodel-figure-templates. It contains ready-to-run Python/matplotlib scripts for the figure templates exposed in the MathModel Improve tab.
Fast Path
- Match the requested chart in
references/figure-catalog.md. - From
/home/user/workspace, run the renderer with the template id:
python3 /home/user/.claude/skills/mathmodel-figure-templates/scripts/render_template.py paired-raincloud
- The renderer copies the bundled template script into
绘图复刻/scripts/, runs it there, and writes outputs to绘图复刻/outputs/. - Return the generated PNG/PDF/SVG paths and the copied script path to the user.
Use --list to show supported ids:
python3 /home/user/.claude/skills/mathmodel-figure-templates/scripts/render_template.py --list
Output Contract
- Work under the current workspace unless the user gives another path.
- Default project folder:
绘图复刻. - Script path:
绘图复刻/scripts/make_<template>.py. - Outputs:
绘图复刻/outputs/<template>_replica.png,.pdf,.svg. - Use the bundled scripts as the first choice; edit the copied workspace script only when the user requests customization.
- The bundled scripts use deterministic simulated data. Do not claim simulated values reproduce a source study exactly.
Template Ids
multiclass-shap-combopaired-raincloudcv-roc-citaylor-diagramcorrelation-pairgridprediction-marginal-gridrf-tpe-surfacegrouped-corr-split-violingrouped-circular-heatmapurban-park-cooling-combonature-chord-diagram
When Customizing
If the user asks for changes, copy/run the nearest template first, then edit the copied file in 绘图复刻/scripts/. Preserve:
MPLCONFIGDIRbefore importing matplotlib.- deterministic seeds for simulated data.
- PNG/PDF/SVG export.
- readable labels, legends, and high-DPI output.
Use references/plot-recipes.md for implementation patterns.