返回顶部
p

py-math-vizPython数学可视化

Create clear math/data visualizations in Python and export to PNG (matplotlib/seaborn; optional OpenCV post-processing). Use when the user asks to plot functions, draw graphs, visualize simulations/trajectories, compare models, make publication-quality plots, or needs a PNG chart for Telegram/notes. Includes scripts to render plots from a JSON spec and to tile/annotate images.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.1
安全检测
已通过
135
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

py-math-viz

Py Math Viz

使用Python生成清晰、可读的图表,并默认导出为PNG格式

假设条件(当前工作区):

  • - 首选解释器:/root/.openclaw/workspace/.venv-math/bin/python
  • 库:matplotlib、seaborn、numpy(已安装)、opencv-python-headless(已安装)

默认设置(质量标准)

  • - 输出格式:PNG,dpi>=200,白色背景
  • 始终标注坐标轴;如有必要添加标题
  • 存在多个数据系列时使用图例(并放置在不遮挡数据的位置)
  • 避免重叠:
- 优先使用constrainedlayout=True和/或plt.tightlayout() - 旋转密集的x轴刻度,缩短刻度标签 - 增大图形尺寸而非强行压缩
  • - 使用一致的样式:
- seaborn.set_theme(style=whitegrid) - 不确定时使用色盲友好调色板

快速入门(脚本)

根据JSON规范渲染图表。
为保持工作区根目录整洁,将输出写入out/(临时实验可写入out/_scratch/):

bash
/root/.openclaw/workspace/.venv-math/bin/python \
skills/py-math-viz/scripts/plotfromspec.py \
--spec spec.json --out out/plots/plot.png

然后发送out/plots/plot.png(Telegram:使用带filePath参数的message工具)。

图表规范

规范设计得尽量精简。
请阅读:

  • - references/spec.md — 模式与示例
  • references/quick-recipes.md — 配方索引(指向JSON规范/ seaborn代码片段/图像拼接)

OpenCV辅助工具

将多个PNG拼接为一个(用于对比):

bash
/root/.openclaw/workspace/.venv-math/bin/python \
skills/py-math-viz/scripts/tile_images.py \
--out tiled.png img1.png img2.png img3.png

不适用场景

  • - 交互式仪表盘(Plotly/Dash),除非明确要求
  • 3D/网格密集型渲染(如有需要请使用专用工具)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 py-math-viz-1775946511 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 py-math-viz-1775946511 技能

通过命令行安装

skillhub install py-math-viz-1775946511

下载

⬇ 下载 py-math-viz v0.1.1(免费)

文件大小: 11.72 KB | 发布时间: 2026-4-12 11:08

v0.1.1 最新 2026-4-12 11:08
Add weather sprite helper (Open-Meteo based), multi-panel PNG output, and doc updates

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部