← Back to Skills Marketplace
matthewhb

data-scatter-plot

by MatthewHB · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
136
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install data-scatter-plot
Description
从CSV/Excel数据文件读取数据,根据Result行数据生成散点图,包含Min/Max Limit参考线
README (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
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install data-scatter-plot
  3. After installation, invoke the skill by name or use /data-scatter-plot
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug data-scatter-plot
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is data-scatter-plot?

从CSV/Excel数据文件读取数据,根据Result行数据生成散点图,包含Min/Max Limit参考线. It is an AI Agent Skill for Claude Code / OpenClaw, with 136 downloads so far.

How do I install data-scatter-plot?

Run "/install data-scatter-plot" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is data-scatter-plot free?

Yes, data-scatter-plot is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does data-scatter-plot support?

data-scatter-plot is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created data-scatter-plot?

It is built and maintained by MatthewHB (@matthewhb); the current version is v1.0.1.

💬 Comments