PluginBench
Skill
Pass
Audit score 90

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
Prerequisites
  • 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
Claude Code
Cursor
Windsurf
Cline

How to use mathmodel-figure-templates

  1. 1.List available templates by running: python3 /home/user/.claude/skills/mathmodel-figure-templates/scripts/render_template.py --list
  2. 2.Match your desired chart type to a template ID from the list
  3. 3.Run the renderer with the template ID (e.g., python3 .../render_template.py paired-raincloud) from /home/user/workspace
  4. 4.The script copies the template to 绘图复刻/scripts/ and outputs PNG/PDF/SVG to 绘图复刻/outputs/
  5. 5.For customization, edit the copied script in 绘图复刻/scripts/ and re-run; preserve MPLCONFIGDIR, seeds, and export formats

Use cases

Good for
  • 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
Who it's for
  • 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

Do I need my own data to use these templates?

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.

Where are the generated figures saved?

Outputs go to 绘图复刻/outputs/ with filenames like <template>_replica.png, .pdf, and .svg.

Can I customize the templates?

Yes. After running the renderer, edit the copied script in 绘图复刻/scripts/. Preserve matplotlib config, random seeds, and export settings.

What if I want to use a template outside the MathModel sandbox?

This skill is designed for the MathModel LaTeX sandbox environment. The scripts rely on that context and may require adaptation for other environments.

How do I know which template matches my chart type?

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

  1. Match the requested chart in references/figure-catalog.md.
  2. 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
  1. The renderer copies the bundled template script into 绘图复刻/scripts/, runs it there, and writes outputs to 绘图复刻/outputs/.
  2. 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-combo
  • paired-raincloud
  • cv-roc-ci
  • taylor-diagram
  • correlation-pairgrid
  • prediction-marginal-grid
  • rf-tpe-surface
  • grouped-corr-split-violin
  • grouped-circular-heatmap
  • urban-park-cooling-combo
  • nature-chord-diagram

When Customizing

If the user asks for changes, copy/run the nearest template first, then edit the copied file in 绘图复刻/scripts/. Preserve:

  • MPLCONFIGDIR before 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.