← 返回 Skills 市场
matthewhb

data-scatter-plot

作者 MatthewHB · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
136
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install data-scatter-plot
功能描述
从CSV/Excel数据文件读取数据,根据Result行数据生成散点图,包含Min/Max Limit参考线
使用说明 (SKILL.md)

数据散点图生成技能

功能描述

本技能用于处理数据文件(Excel/CSV),自动识别数据格式,并生成基于指定标题的散点图。

核心功能

  1. 智能数据解析:自动识别Item列、Result数据行、Min/Max Limit行
  2. 动态散点图生成:根据指定标题组合生成散点图
  3. Limit线绘制:自动从数据中提取Min/Max Limit值并绘制参考线
  4. 批量导出:支持批量生成并保存为PNG图片

数据格式说明

输入文件格式(支持 .csv, .xls, .xlsx)

结构 说明
第1列 Item名称(如 LESD3Z5.0CMT1HG)
其他列 列标题(如 1 CONT2(V))
Result行 散点图的数值数据来源
Min Limit行 最小限制值
Max Limit行 最大限制值

散点图标题命名规则

标题格式:'{第1列Item名称} + {对应列的列标题}'
示例:'LESD3Z5.0CMT1HG + 1 CONT2(V)'

Y轴标签

  • 取自对应列的 Limit Unit(如 mV, V, mA 等)

使用方法

基本用法

from scripts.data_loader import ExcelDataLoader
from scripts.scatter_generator import ScatterPlotGenerator

# 1. 加载数据
loader = ExcelDataLoader('path/to/Test.xls')
data = loader.load()

# 2. 获取可用的散点图配置
configs = loader.get_scatter_configs()

# 3. 生成散点图
generator = ScatterPlotGenerator(output_dir='output/plots')
for config in configs:
    generator.generate(data, config)

命令行用法

python -m scripts.main --input Test.xls --output-dir output/plots

配置参数

ScatterConfig 配置对象

参数 类型 必填 说明
item_name str 第1列的Item名称
column_title str 对应列的列标题
y_label str Y轴标签(默认取Limit Unit)
min_limit float Min Limit值
max_limit float Max Limit值
result_data List[float] Result行数据

命令行参数

参数 简写 说明 默认值
--input -i 输入数据文件路径(支持.csv/.xls/.xlsx) 必需
--output-dir -o 输出图片目录 ./plots
--format -f 输出格式 png
--dpi - 图片分辨率 1200

输出示例

生成的散点图包含:

  • 16:9 宽屏比例
  • 主数据散点(蓝色圆点)
  • 智能Limit线绘制
    • 只有Min Limit → 仅绘制Min Limit线
    • 只有Max Limit → 仅绘制Max Limit线
    • 两者都有 → 绘制两条线
    • 两者都没有 → 只绘制散点图
  • Min Limit水平线(红色虚线,标注"Min Limit")
  • Max Limit水平线(红色虚线,标注"Max Limit")
  • X轴:数据点索引
  • Y轴:对应Limit Unit
  • 标题:'{Item名称} + {列标题}'

数据格式要求

  • Result行及以下数据必须为数值格式(不支持文本格式)
  • 支持带单位格式(如 "5mV")自动提取数值部分

注意事项

  1. 空值处理:Result行中的空值会被自动跳过
  2. Limit行识别:通过固定行名"Min Limit"和"Max Limit"识别
  3. 文件编码:CSV文件支持 UTF-8、GBK、GB2312、Latin1 自动识别
  4. 依赖安装pip install -r requirements.txt

依赖清单

pandas>=1.5.0
matplotlib>=3.5.0
openpyxl>=3.0.0
xlrd>=2.0.0
安全使用建议
This skill appears to do exactly what it says: parse CSV/XLS/XLSX files and generate scatter-plot PNGs. Before installing/running: 1) Run in an isolated environment (virtualenv) when you pip-install requirements to avoid changing your system Python. 2) Verify your input files match the expected format (rows named exactly 'Result', 'Min Limit', 'Max Limit' and item names in the first column). The code contains minor documentation/implementation inconsistencies (comments mention a '22nd row / index 21' but the TITLE_ROW_INDEX is 0; SKILL.md shows DPI default 1200 while the code uses 300) — these are likely bugs, not malicious behavior. 3) Expect the tool to read the provided data file path and write image files to the output directory; there are no network calls or credential requirements. If you need tighter assurances, ask the author to clarify/fix the row-index and DPI inconsistencies and to remove or reduce debug prints.
能力评估
Purpose & Capability
Name/description claim reading CSV/Excel and producing scatter plots; the repository contains code (data loading + plot generator + CLI) that directly implements that functionality. No unrelated binaries, env vars, or external services are requested.
Instruction Scope
SKILL.md and code direct the agent to read user-provided data files and write PNG outputs — this matches the purpose. Minor scope/document issues: SKILL.md and code/doc comments disagree on which row is used for titles/Result (comments mention '第22行/索引21' but TITLE_ROW_INDEX is 0), and the SKILL.md lists a DPI default of 1200 while code defaults to 300. These are implementation/documentation inconsistencies but not indications of malicious behavior. Instructions do require installing requirements.txt (normal for Python).
Install Mechanism
No install spec in registry; skill is instruction+code. Dependencies are standard Python packages listed in requirements.txt (pandas, matplotlib, openpyxl, xlrd) which would be installed via pip — a common and expected mechanism for this type of tool. No downloads from untrusted URLs or archive extraction are present.
Credentials
No environment variables, credentials, or config paths are requested. All file access is limited to the user-provided input file and the output directory created by the tool. There are no attempts to access system credentials or external tokens.
Persistence & Privilege
Skill does not request permanent presence (always:false) and does not modify other skills or system-wide agent configuration. It only creates its own output directory/files as expected for a plotting tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install data-scatter-plot
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /data-scatter-plot 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 输出图片默认分辨率由300 DPI提升至1200 DPI。 - 智能Limit线绘制:支持仅有Min或Max Limit时分别绘制对应参考线,两者都没有则只绘制散点图。 - 增加对结果及Limit数据带单位(如 "5mV")的自动提取数值支持。 - 明确要求Result行等数据必须为数值格式,不支持文本。 - 文档其余说明保持一致,未做其他功能变动。
v1.0.0
-散点图绘制,针对数据进行绘制 - Initial release of the data-scatter-plot skill. - Reads data from CSV/Excel files and auto-identifies Item, Result, Min/Max Limit rows. - Generates scatter plots with Min/Max limit reference lines based on specified titles. - Supports batch export of plots as PNG images. - Command-line and Python API usage provided. - Handles multiple file encodings and skips empty values in Result rows.
元数据
Slug data-scatter-plot
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

data-scatter-plot 是什么?

从CSV/Excel数据文件读取数据,根据Result行数据生成散点图,包含Min/Max Limit参考线. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 136 次。

如何安装 data-scatter-plot?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install data-scatter-plot」即可一键安装,无需额外配置。

data-scatter-plot 是免费的吗?

是的,data-scatter-plot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

data-scatter-plot 支持哪些平台?

data-scatter-plot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 data-scatter-plot?

由 MatthewHB(@matthewhb)开发并维护,当前版本 v1.0.1。

💬 留言讨论