Data Visualization

v1.0.0

根据数据类型智能选择图表,并按统一规范生成专业 Python matplotlib 可视化代码。 支持三套专业风格模板:BCG(默认绿色简洁风)、The Economist(红线+青蓝媒体风)、McKinsey(亮青+浅灰咨询风)。 触发场景:用户需要可视化数据、生成图表、画图、制作柱状图/折线图/饼图/散点图/...

1· 116·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for veezvg/veezvg-data-visualization.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Data Visualization" (veezvg/veezvg-data-visualization) from ClawHub.
Skill page: https://clawhub.ai/veezvg/veezvg-data-visualization
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install veezvg-data-visualization

ClawHub CLI

Package manager switcher

npx clawhub@latest install veezvg-data-visualization
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (generate professional matplotlib code in three styles) matches the shipped assets and requirements: the repo contains examples, references, and a SKILL.md describing how to pick templates and produce code. No extraneous credentials, binaries, or unrelated capabilities are requested.
Instruction Scope
SKILL.md directs the agent to analyze data, select a chart type, prefer examples/ templates in examples/, consult references/visualization_spec.md, and output Python code. The instructions do not ask the agent to read unrelated system files, access environment variables, or transmit data externally. They do instruct producing runnable code and the example scripts save images to disk (plt.savefig), which is expected for this purpose.
Install Mechanism
No install specification; the skill is instruction-only with included example scripts. There are no downloads or package installs described in SKILL.md or the manifest. Risk from installation is minimal.
Credentials
The skill requires no environment variables, no credentials, and no config paths. The only system dependency in the code is an explicit font path (/System/Library/Fonts/STHeiti Light.ttc), which is a cross-platform compatibility detail (not a secret) and not a credential request.
Persistence & Privilege
The skill is not always-enabled (always: false) and does not request persistent privileges or modify other skills or global agent settings. It performs normal local file writes (saving PNGs) when example scripts are run, which is appropriate for plotting templates.
Assessment
This skill appears coherent and safe: it ships only matplotlib templates, style guides, and instructions to pick/modify examples and output Python plotting code. There are a few practical things to note before running generated code: (1) Example scripts save images to the current working directory (plt.savefig) — expect local file writes. (2) All examples reference a macOS font path (/System/Library/Fonts/STHeiti Light.ttc); on other OSes you may need to adjust the font path or install an appropriate Chinese font. (3) The skill does not call the network or request credentials, but as with any code from an untrusted source, inspect generated scripts before executing them in sensitive environments. Finally, ensure you have matplotlib (and any required fonts) installed locally; the repository README notes licensing is unspecified, so confirm licensing if you plan to redistribute.

Like a lobster shell, security has layers — review code before you run it.

latestvk97eabmfm5523nx77h7c2nk6a9856472
116downloads
1stars
1versions
Updated 1w ago
v1.0.0
MIT-0

Data Visualization

根据数据类型智能选择图表,按统一规范生成 Python matplotlib 代码。三套风格均按真实报告视觉提取并可复刻。

工作流程

  1. 询问风格 - 若用户未指定风格,展示三套选项供选择
  2. 分析数据 - 识别数据类型(时序、分类、占比等)
  3. 选择图表 - 参考 references/chart_selection.md 匹配最佳图表类型
  4. 找对应示例 - 优先从 examples/ 中找最接近的模板脚本,直接照着改
  5. 查细节规范 - 遇到 examples 没覆盖的场景,查 references/visualization_spec.md
  6. 输出代码 - 生成完整可运行的 Python 代码

风格选项

#风格适用场景主色
1BCG(默认)通用数据分析、研究报告绿色 #2ca02c
2The Economist媒体发布、公开报告红线 #E3120B + 蓝 #006BA2
3McKinsey咨询汇报、高管演示亮青 #2CBDEF + 浅灰 #D4D4D4

示例脚本(examples/)

所有示例都是完整可运行的脚本,改数据即用。

脚本风格图表类型参考
bcg_hbar.pyBCG水平柱状图通用调研报告
economist_hbar.pyEconomist水平条形图类别排行对比
economist_line.pyEconomist折线图(时间序列)多系列趋势,重点上色
mckinsey_grouped_vbar.pyMcKinsey分组垂直柱Exhibit 7 样式
mckinsey_grouped_hbar.pyMcKinsey分组水平条Exhibit 4 样式
mckinsey_stack100.pyMcKinsey100% 堆叠单条Exhibit 1 样式(Likert-scale)

图表选择速查

数据类型推荐图表
趋势变化Line Chart
类别比较Bar Chart
占比分布 (≤5项)Pie/Donut
占比分布 (>5项)Stacked Bar
Top vs Others 对比分组柱状图(McKinsey 标配)
Likert-scale 分布100% 堆叠单条(渐变色)
相关性Scatter Plot
层级结构Treemap

完整 25 种数据类型映射见 references/chart_selection.md

各风格核心规范速查

BCG 风格

  • 主色 #2ca02c(绿),无渐变
  • 标题含样本量 (N=X)
  • 去除上/右/下边框,无网格线

The Economist 风格

  • 白色背景(非蓝灰)
  • 顶部标志元素:全宽红线 #E3120B + 左上角红色方块 tag,都用 fig.transFigure + clip_on=False禁用 fig.add_axes
  • 所有左对齐元素(红线起点/tag/标题/分类标签)共用基准 LEFT_X=0.14
  • 主数据系列 #006BA2,灰化对照 #758D99
  • 分类标签必须用 blended_transform_factory(fig.transFigure, ax.transData) 对齐,否则会超出 LEFT_X 左端

McKinsey 风格

  • 亮青 #2CBDEF + 浅灰 #D4D4D4 二元对照(非单色高亮其他灰化)
  • 左上"Exhibit X"小灰字 + 下方全宽细分隔线
  • 超大粗体标题(15~17pt),结论句
  • 图例在右上角,色块 + 文字纵向排列
  • 柱子必须width=0.32~0.38
  • y 轴隐藏刻度,数字直接写在柱上
  • 来源注脚写 Source: 或"资料来源:"

三条常见坑(必看)

  1. 禁用 fig.add_axes(会与布局系统冲突)。Economist 的红线/tag 用 ax.plot + mpatches.Rectanglefig.transFigure + clip_on=False
  2. 禁用 ax.set_ylabel 放中文单位(会伸出 LEFT_X 左侧破坏对齐)。y 方向单位写进副标题;set_xlabel 可用(在 x 轴下方居中)。
  3. 轴刻度 formatter 禁止含中文汉字(字体缺失变方块)。中文单位用副标题或 set_xlabel

完整规范(三套共享工具函数 + 所有代码模板)见 references/visualization_spec.md

关键约束

  1. 占比数据超过 5 项时,用堆叠柱状图替代饼图
  2. 中文必须通过 FontProperties 显式设置(/System/Library/Fonts/STHeiti Light.ttc
  3. BCG 标题含样本量 (N=X);McKinsey 标题是结论句 + "Exhibit X"编号;Economist 标题是描述性短句
  4. 数据标签格式 {:.1f}%{:.2f}(看量级)

Comments

Loading comments...