Use when the main agent must create or validate figures directly, either to understand data during analysis or to produce real visual assets for reports, writer handoff, and user-facing delivery. Build figures with matplotlib first, then inspect rendered images for readability, layout defects, missing content, Chinese font failures, and whether the figure actually serves the intended analytical or communication goal.
Use this skill directly from the main agent.
This is a two-stage skill built around matplotlib:
matplotlibUse it in two scenarios:
visualization/, writer handoff, or direct user reportingscratch/visualization/YYYY-MM-DD_HHMMSS/visualization/ before invoking push-writeranalysis: the figure is mainly for the main agent's own reasoningdeliverablematplotlib is missing, install the figure stack first:
uv pip install matplotlib seaborn plotly pandas pillow
If uv is unavailable:
python3 -m pip install matplotlib seaborn plotly pandas pillow
python3 <path-to-skill>/scripts/detect_cjk_font.py --style sans
Use serif only when the figure clearly needs a serif family.python3 <path-to-skill>/scripts/make_matplotlib_chart.py \
--chart line \
--input data.csv \
--x epoch \
--y accuracy,loss \
--legend-labels "准确率,损失" \
--title "训练过程概览" \
--xlabel "轮次" \
--ylabel "数值" \
--scenario analysis \
--purpose "比较模型随轮次变化的主要指标" \
--output-dir scratch/visuals/training_overview
This writes at least PNG, SVG, and metadata. Use --journal nature or --journal default when needed.python3 <path-to-skill>/scripts/render_visual.py \
--input scratch/visuals/training_overview/training_overview.png \
--output scratch/visuals/training_overview.png
When the chart script already wrote a correct PNG, this step can simply normalize the inspection path.visualization/push-writer or mention it in a user-facing reportscripts/detect_cjk_font.py: detect a Chinese-safe font family available on the hostscripts/style_presets.py: publication and journal style presets built on matplotlibscripts/figure_export.py: stable export helpers for png/svg/pdf outputsscripts/make_matplotlib_chart.py: create scientific charts with matplotlib and Chinese-safe font handlingscripts/render_visual.py: render SVG or PDF into PNG for visual inspectionassets/publication.mplstyle: base publication styleassets/nature.mplstyle: Nature-oriented style variant