chart-reading
Skill1 starsChanged 3 months agoMITView on GitHub
从图表图片提取结构化数据:柱状图/折线图/饼图/散点图等。读取数值、坐标轴、 图例,输出 JSON + Markdown 摘要,标注哪些值是精确标注、哪些是刻度线估读。 用户说"读这个图的数据""图表提取""这个柱状图/折线图/饼图的数值是多少" 并给图表图时自动触发。
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- image-qaSkill
- ocr-extractSkill
- ui-feedbackSkill
- vision-coreSkill
The file
Files
chart-reading(场景层:图表数据读取)
把图表图片里的数据提取为结构化 JSON + 人类可读摘要。诚实标注数据来源: 图上直接标注的数值 vs 按刻度线估读的近似值——绝不把估读当成精确数字。
触发场景
- 柱状图 / 折线图 / 饼图 / 面积图 / 散点图 / 雷达图,需要里面的数值
- "读这个图的数据"、"图表提取"、"把图表转成表格"
工作流
预处理:最长边 >1400px 先缩到 1400。图表文字若小,先全图读一遍,再对图例/坐标轴
区域 glance --region 补读。
推荐:图表读取时设 VISION_TEMPERATURE=0 提高确定性(在 env 文件加一行
VISION_TEMPERATURE=0),跑完可改回。
Pass 1 — 全图结构化提取(必做)
glance "<图>" -q "<图表提取 prompt,见下>"Pass 2 — 小字/坐标轴/图例补读(推荐)
detect "<图>" # 枚举轴刻度、图例、数值标注的位置
glance "<图>" --region X1,Y1,X2,Y2 -q "逐字读出这块区域的所有数字和文字"Pass 3 — 数据校验自检(推荐)
glance "<图>" -q "请逐项说明:哪些数值是图上直接标注的?哪些是你按坐标轴刻度估读的?估读的给出误差估计。"图表提取 prompt(喂给 glance 的 -q)
你是图表数据提取器。请从这张图表中提取结构化数据,只输出一个 JSON 对象,字段:
{ "chartType": "bar|line|pie|scatter|area|other", "title": "图表标题", "xAxis": { "categories": ["..."], "scale": "linear|log|..." }, "yAxis": { "label": "...", "unit": "...", "min": ..., "max": ... }, "legend": ["系列名..."], "series": [ { "name": "...", "data": [数值...] } ] }规则:
- 数值来源:优先使用图上直接标注的数值并保持原样(不要四舍五入改写)。若某 数值无标注,只能根据坐标轴刻度估读,在该数据点旁标注
"estimate": true,并给出 估读误差范围,例如{"estimate": true, "value": 610, "error": "+/-10"}- 禁止编造:看不清或无法确定的值,用
null并注明"uncertain": true,绝不猜- 坐标轴范围、刻度间隔、单位、图例必须包含;对数轴要标注
"scale": "log"- 多系列数据逐系列列出,保持顺序
输出格式
## 图表数据读取结果
**图表类型**:<bar/line/pie/...>
**标题**:<...> **单位**:<...>
### 数据(JSON)
```json
<Pass 1 返回的 JSON,经过坐标/单位核对>摘要
- 关键发现:<趋势/极值/异常点,引用具体数值>
- 数据可信度:<哪些精确标注、哪些估读,估读误差多少>
- 坐标轴/图例/单位说明
待核对项
- <如"Q3 柱顶的数值标注被遮挡,估读 610±10,建议查原始数据">
## 精度说明(实测 + 参考)
- **有数值标注的图**:现代视觉模型可精确到 99%+(Qwen3-VL/Nemotron 在已知数据图表上
达 99.8-100% 准确率)。这类图直接信标注值。
- **无标注、纯刻度估读**:本套件实测 ±2% 左右(如真值 710 估读 700),且有系统性
低估倾向。这类值**必须**标注 `estimate: true` 并给误差范围。
- **严谨验证法**(可选,做数据分析时用):用已知数据 + matplotlib 重新生成图 → 提取 →
用 MAPE 对比提取值与真值,量化误差。见 ../references/accuracy.md。
## 工具
- `glance -q`(结构化提取)、`detect` / `glance --region`(小字补读)、`palette`(图例色)
- 出错时如实报告,**绝不编造数值**。
Source: 基于 vision-core + themenonlab chart-extraction-validation 方法论文献 + 实测校准Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

