mathmodel-figure-templates
jihe520/mathmodelagent
Ready-to-run scientific visualization templates for MathModel LaTeX sandbox.
What is mathmodel-figure-templates?
A collection of pre-built Python/matplotlib scripts for common research figure templates used in scientific publishing. Use this skill when you need to quickly reproduce publication-quality charts like SHAP plots, correlation matrices, ROC curves, Taylor diagrams, and heatmaps within the MathModel environment.
- Provides 11 pre-configured chart templates (SHAP, paired raincloud, ROC with CI, Taylor diagram, correlation grids, prediction margins, TPE surfaces, violin plots, circular heatmaps, urban cooling combos, Nature chord diagrams)
- Renders templates as PNG, PDF, and SVG outputs in a dedicated workspace folder
- Includes deterministic simulated data so charts run immediately without external datasets
- Allows editing of copied scripts for customization while preserving matplotlib configuration and export settings
- Lists all available template IDs via command-line flag
How to install mathmodel-figure-templates
npx skills add https://github.com/jihe520/mathmodelagent --skill mathmodel-figure-templates- Access to MathModel LaTeX sandbox environment
- Python 3 with matplotlib installed
- Skill installed via: npx skills add https://github.com/jihe520/mathmodelagent --skill mathmodel-figure-templates
How to use mathmodel-figure-templates
- 1.List available templates by running: python3 /home/user/.claude/skills/mathmodel-figure-templates/scripts/render_template.py --list
- 2.Match your desired chart type to a template ID from the list
- 3.Run the renderer with the template ID (e.g., python3 .../render_template.py paired-raincloud) from /home/user/workspace
- 4.The script copies the template to 绘图复刻/scripts/ and outputs PNG/PDF/SVG to 绘图复刻/outputs/
- 5.For customization, edit the copied script in 绘图复刻/scripts/ and re-run; preserve MPLCONFIGDIR, seeds, and export formats
Use cases
- Quickly generate a SHAP beeswarm plot to visualize feature importance in a machine learning model
- Create a paired raincloud plot to compare distributions across groups in a publication
- Reproduce a cross-validation ROC curve with confidence intervals for model evaluation reports
- Build a Taylor diagram to assess model performance against observations
- Generate a correlation matrix visualization with multiple linked subplots for exploratory analysis
- Researchers and data scientists working in the MathModel LaTeX sandbox
- Machine learning practitioners needing publication-ready evaluation plots
- Academic authors preparing figures for journal submissions
- Anyone reproducing or adapting standard scientific visualization patterns
mathmodel-figure-templates FAQ
No. The bundled scripts use deterministic simulated data, so they run immediately. You can edit the copied script to swap in your own data later.
Outputs go to 绘图复刻/outputs/ with filenames like <template>_replica.png, .pdf, and .svg.
Yes. After running the renderer, edit the copied script in 绘图复刻/scripts/. Preserve matplotlib config, random seeds, and export settings.
This skill is designed for the MathModel LaTeX sandbox environment. The scripts rely on that context and may require adaptation for other environments.
Use --list to see all 11 template IDs, or check references/figure-catalog.md in the skill for descriptions and examples of each.
Full instructions (SKILL.md)
Source of truth, from jihe520/mathmodelagent.
name: mathmodel-figure-templates description: Use this skill in the MathModel LaTeX sandbox when the user asks to reproduce built-in scientific visualization templates, especially prompts from the Improve tab mentioning $mathmodel-figure-templates, 科研绘图模板, SHAP蜂群柱状图, 配对云雨图, 交叉验证ROC, 泰勒图, 相关矩阵组合图, 预测真实值边缘分布图, TPE调参3D曲面, 下三角相关矩阵半边小提琴图, 分组环形热图, 城市公园降温组合图, or Nature和弦图. It provides ready-to-run Python scripts bundled inside the skill. allowed-tools: Bash(*), Read, Write, Edit, Grep, Glob
MathModel 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.
Related skills
More from jihe520/mathmodelagent and the wider catalog.

typst-author
Generate, edit, and troubleshoot Typst documents with syntax guidance and best practices.

1start-mathmodel
Orchestrate mathematical modeling competition workflows from problem analysis through paper submission.

2analysis-modeling
Analyze math competition problems and design solution models with structured decomposition and implementation planning.

3coding-visual
Implement mathematical models, run solvers, and generate publication-ready data-driven charts from analysis reports.

claude-design
Create high-fidelity design artifacts in HTML—landing pages, decks, prototypes, animations, and visual explorations.

chinese-content-writing-guideline
>-