mcpField
M
mathmodel-figure-templates

mathmodel-figure-templates

github.com/jihe520Data & databases268290 installsUpdated 11w ago
Repository

About mathmodel-figure-templates

A skill for the LaTeX sandbox that provides ready-to-run Python/matplotlib figure templates. Users select a template ID to render PNG, PDF, and SVG files, with scripts and outputs saved in the workspace.

Key features

  1. 01Includes 11 figure templates
  2. 02Renders figures by template ID
  3. 03Exports PNG, PDF, and SVG
  4. 04Saves scripts and results in the workspace

Use cases

  1. 01Quickly generate figures for a paper
  2. 02Find and run a suitable figure template

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jihe520/sci-box --skill mathmodel-figure-templates

After installing, type/mathmodel-figure-templatesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
figure-catalog.md
plot-recipes.md
scripts/
render_template.py
scripts/templates/
make_correlation_pairgrid.py
make_cv_roc_ci.py
make_grouped_circular_heatmap.py
make_grouped_corr_split_violin.py
make_multiclass_shap_combo.py
make_nature_chord_diagram.py
make_paired_raincloud.py
make_prediction_marginal_grid.py
make_rf_tpe_surface.py
make_taylor_diagram.py
make_urban_park_cooling_combo.py

Details

From the project README

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.

Comments

Markdown supported