📦 学术图表

v1.0.0

一键生成可发表的学术图表,支持7种图表类型(条形图、热力图、散点图、折线图、箱线图、森林图、小提琴图)、4种配色……

0· 28·0 当前·0 累计
0
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
安全
high confidence
该技能的代码、指令与需求均与本地图形生成工具保持一致,不请求无关凭据、网络访问或系统级权限。
评估建议
This skill appears coherent and self-contained: it generates charts locally and auto-detects system CJK fonts. Before installing, ensure you have the expected Python environment (matplotlib, numpy) and run the scripts on sample data in a safe environment. Review the two included scripts (detect_cjk_font.py and gen_figure.py) yourself if you are concerned about behavior, and run them offline if you want to be certain no unexpected network activity occurs. If you rely on a managed agent, confirm t...
详细分析 ▾
用途与能力
Name/description match the delivered artifacts: included Python scripts implement chart generation, CJK font detection, and the described chart types and options. No unrelated binaries or cloud credentials are requested.
指令范围
SKILL.md instructions focus on loading data, detecting CJK fonts, and producing PNG/SVG output. The runtime instructions and the code operate on local files and do not direct data to external endpoints. The scripts do invoke local font discovery (fc-list) and execute the bundled detect_cjk_font.py, which is coherent with the CJK support claim.
安装机制
There is no install spec and no external downloads; the skill is instruction-only with two included Python scripts. Nothing in the manifest attempts to fetch or execute remote archives.
凭证需求
The skill declares no required environment variables or credentials, and the code only accesses local filesystem paths (font files, input JSON/CSV, and output images). The use of subprocess to run fc-list and the bundled detect script is consistent with font detection and does not require extra secrets.
持久化与权限
The skill is not force-installed (always=false) and does not attempt to modify other skills or global configuration. It runs as a local script and does not request elevated or persistent platform privileges.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install academic-figures
镜像加速npx clawhub@latest install academic-figures --registry https://cn.longxiaskill.com

技能文档

学术图表 — 出版级图表生成器 从 JSON/CSV 数据一键出图。本地运行,数据不出机。

快速开始 # 带 CJK 支持的柱状图 python3 scripts/gen_figure.py -t bar -d data.json -o figure.png --cjk \ --title "图2 主标题 / Subtitle" --ylabel "准确率 Accuracy (%)"

# 热力图 python3 scripts/gen_figure.py -t heatmap -d data.json -o heatmap.png --cjk \ --cmap RdBu_r --vmin -20 --vmax 45

# 带趋势线散点图 python3 scripts/gen_figure.py -t scatter -d data.csv -o scatter.png \ --xlabel "Baseline (%)" --ylabel "Gain (%)" --theme nature

图表类型 Type    Key Features Bar -t bar  分组柱、误差线、显著性括号 Heatmap -t heatmap 单元格标注、自定义 colormap、colorbar Scatter -t scatter 趋势线、r 值、颜色分组、均值点 Line -t line 多系列、误差带、标记 Box -t box 箱线图、抖动点 Forest -t forest CI 须、总钻石、参考线 Violin -t violin 密度估计、内均值/中位数

配色主题 --theme nature Nature 期刊配色(鲜明、易区分) --theme lancet Lancet 医学配色(高对比) --theme conservative 专业低饱和(通用安全) --theme default 平衡百搭

中文支持 加 --cjk 自动检测并加载系统 CJK 字体,零配置。 python3 scripts/gen_figure.py -t bar -d data.json -o fig.png --cjk 字体优先级:Noto Sans CJK → PingFang → Microsoft YaHei → WQY → AR PL → Droid 自定义:--cjk-font /path/to/font.ttf

数据输入 JSON(全功能)或 CSV(基础)。格式详见 references/data-formats.md JSON 柱状图示例: { "labels": ["Group A", "Group B"], "series": {"Treatment": [75, 82], "Control": [68, 70]}, "errors": {"Treatment": [3, 2], "Control": [2, 1]}, "significance": {"Treatment:0": "***", "Control:1": "NS"} }

关键参数 --title "text" 标题(支持 \n 换行) --xlabel, --ylabel 轴标签 --width N, --height N 图尺寸(英寸) --show-values 柱上显示数值 --no-trend 隐藏趋势线(散点) --no-legend 隐藏图例 --cmap NAME colormap(热力图) --vmin, --vmax 数值范围(热力图)

输出 .png 默认 300 DPI 位图 .svg 矢量图(--out 指定 .svg 扩展名)

脚本调用(非 CLI) 若通过 Python 脚本生成:

  • 先 detect_cjk_font()
  • CJK 文本统一用 fontproperties=font_prop
  • plt.rcParams['axes.unicode_minus']=False
  • 验证:多标签图 >20 KB 表示字体已载入
  • 推荐输出:PNG 300 DPI,bbox_inches='tight',白底
数据来源ClawHub ↗ · 中文优化:龙虾技能库