mathmodel-figure-templates

Generate publication-style scientific figures from bundled Python matplotlib templates.

4.0k|356|Updated Jan 30, 2025
One-click install
npx skills add https://github.com/jihe520/MathModelAgent --skill mathmodel-figure-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mathmodel-figure-templates
Source: https://github.com/jihe520/MathModelAgent/tree/main/skills/mathmodel-figure-templates
Command: npx skills add https://github.com/jihe520/MathModelAgent --skill mathmodel-figure-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Reproducing complex scientific visualizations such as SHAP beeswarm composites, raincloud plots, Taylor diagrams, and chord diagrams requires substantial matplotlib expertise and time. This Skill provides ready-to-run Python scripts that render eleven publication-style figure templates with a single command.

Core Features & Use Cases

  • Eleven Bundled Templates: Includes multiclass SHAP combo, paired raincloud, cross-validation ROC with confidence intervals, Taylor diagram, correlation pairgrid, prediction marginal grid, TPE 3D tuning surface, split-violin correlation matrix, grouped circular heatmap, urban cooling composite, and Nature-style chord diagram.
  • One-Command Rendering: A renderer script copies the chosen template into the workspace, executes it, and exports PNG, PDF, and SVG outputs at 300 DPI.
  • Flexible Template Resolution: Accepts template ids, English aliases, or Chinese title fragments to locate the correct figure script.
  • Use Case: A researcher writing a machine learning paper needs a cross-validation ROC figure with confidence bands; they request the cv-roc-ci template and receive deterministic, editable scripts plus high-resolution outputs.

Quick Start

Ask the agent to render the paired raincloud figure template and return the generated PNG, PDF, and SVG files.

Frequently Asked Questions about mathmodel-figure-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a SHAP beeswarm summary figure in Python?

Run the renderer with the multiclass-shap-combo template id to produce a stacked importance bar chart combined with per-class SHAP beeswarm panels. The script exports PNG, PDF, and SVG files at 300 DPI using deterministic simulated data.

How to plot ROC curves with confidence intervals using matplotlib?

Use the cv-roc-ci template, which interpolates fold curves onto a shared FPR grid, draws the mean curve with a standard-deviation band, and adds an AUC mean ± sd legend. It simulates five-fold curves for five models including XGBoost and LightGBM.

What chart templates are included in this skill?

Eleven templates are bundled: multiclass SHAP combo, paired raincloud, CV ROC with CI, Taylor diagram, correlation pairgrid, prediction marginal grid, RF TPE 3D surface, grouped correlation split violin, grouped circular heatmap, urban park cooling combo, and Nature chord diagram.

Can I customize the generated matplotlib figures?

Yes. The renderer copies the template script into the workspace scripts folder, where you can edit it directly. Preserve the MPLCONFIGDIR setting, deterministic seeds, and the PNG/PDF/SVG export logic when modifying.

Do the figure templates use real experimental data?

No. All bundled scripts generate deterministic simulated data with fixed random seeds to reproduce the visual layout of reference figures. You should replace the simulated values with your own data before using figures in publications.

Why does matplotlib fail to write config files when rendering?

Matplotlib needs a writable cache directory. The templates set MPLCONFIGDIR to a local .mplconfig folder before importing matplotlib, which prevents permission errors in sandboxed or read-only environments.