Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

matplotlib-promatplotlib 专业版

Agent Skill

matplotlib-pro 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

679

周安装

28

GitHub Stars

9

下载量

222
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:matplotlib-pro(matplotlib 专业版)
来源仓库:https://github.com/tondevrel/scientific-agent-skills
仓库路径:skills/matplotlib-pro
安装命令:
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill matplotlib-pro
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill matplotlib-pro

简介

matplotlib-pro 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Matplotlib - Professional Viz & Animation

Beyond static plots, Matplotlib is a powerful engine for dynamic data visualization and scientific storytelling. This guide focuses on the "Pro" features: blitting for speed, Artist hierarchy for control, and LaTeX integration for papers.

When to Use

  • Creating high-FPS animations for simulations (Fluid dynamics, N-body).
  • Building custom interactive tools inside Jupyter or a GUI.
  • Generating pixel-perfect figures for academic journals.
  • Visualizing real-time data streams from sensors.

Core Principles

1. The Artist Hierarchy

Everything you see is an Artist. Figures contain Axes, Axes contain Lines, Text, Patches. Pro-level control means manipulating these objects directly instead of using high-level plt commands.

2. Blitting (The Secret to Speed)

Standard animation redraws the whole figure every frame (slow). Blitting only redraws the parts that changed (e.g., the moving line), while keeping the axes and labels cached as a background image.

3. Backend Mastery

  • Agg: High-quality static PNGs.
  • PDF/PGF: Vector-based for LaTeX.
  • TkAgg/QtAgg: Interactive windows.

High-Performance Animation

Using FuncAnimation with Blitting

import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

fig, ax = plt.subplots()
line, = ax.plot([], [], lw=2) # Returns the Line2D artist

def init():
    ax.set_xlim(0, 2*np.pi)
    ax.set_ylim(-1, 1)
    return line, # Note the comma

def update(frame):
    x = np.linspace(0, 2*np.pi, 100)
    y = np.sin(x + frame/10.0)
    line.set_data(x, y)
    return line,

# blit=True is critical for performance
ani = FuncAnimation(fig, update, frames=100, init_func=init, blit=True)
plt.show()

Publication Standards

1. LaTeX & PGF Backend (For Papers)

import matplotlib as mpl

mpl.use("pgf") # Use PGF for perfect LaTeX integration
mpl.rcParams.update({
    "pgf.texsystem": "pdflatex",
    "font.family": "serif",
    "text.usetex": True,
    "pgf.rcfonts": False,
})

fig.savefig("figure.pgf") # Import this directly into your LaTeX doc

2. Complex GridSpec Layouts

import matplotlib.gridspec as gridspec

fig = plt.figure(constrained_layout=True)
gs = gridspec.GridSpec(3, 3, figure=fig)

ax_main = fig.add_subplot(gs[0:2, :]) # Top 2/3rds
ax_hist_x = fig.add_subplot(gs[2, 0:2]) # Bottom left
ax_hist_y = fig.add_subplot(gs[2, 2]) # Bottom right

Interactive Widgets

Custom Sliders and Buttons

from matplotlib.widgets import Slider

fig, ax = plt.subplots()
plt.subplots_adjust(bottom=0.25)
line, = ax.plot(x, np.sin(x))

ax_freq = plt.axes([0.25, 0.1, 0.65, 0.03])
slider = Slider(ax_freq, 'Freq', 0.1, 30.0, valinit=1.0)

def update(val):
    line.set_ydata(np.sin(slider.val * x))
    fig.canvas.draw_idle() # Optimized redraw

slider.on_changed(update)

Critical Rules

✅ DO

  • Use fig.canvas.draw_idle() - It tells Matplotlib to redraw only when the event loop is free, preventing UI lag.
  • Vectorize Text - Save as .svg or .pdf to ensure labels don't pixelate in reports.
  • Close your animations - Use plt.close() to prevent memory leaks in notebooks.
  • Use ArtistAnimation - If you already have all frames calculated as images, ArtistAnimation is faster than FuncAnimation.

❌ DON'T

  • Don't use plt.pause() in heavy loops - It's inefficient; use the animation framework.
  • Don't hardcode "inches" - Use fig.get_size_inches() and scale relative to the figure size for portability.
  • Don't ignore Tight Layout - Overlapping subplots are a common "amateur" mistake. Use fig.set_constrained_layout(True).

Matplotlib Pro is the bridge between data and insight. Mastering the blitting engine and the PGF backend allows scientists to create dynamic evidence that is as visually compelling as it is mathematically rigorous.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.55%
按下载量换算77

Claude

30.36%
按下载量换算67

Cursor

20.8%
按下载量换算46

Gemini CLI

9.8%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills