← 返回 Skills 市场
docsor1212

Academic Figures

作者 docsor1212 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
54
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install academic-figures
功能描述
Generate publication-quality academic figures from data with one command. Supports 7 chart types (bar, heatmap, scatter, line, box, forest, violin), 4 color...
使用说明 (SKILL.md)

Academic Figures — Publication-Quality Chart Generator

Generate figures from JSON/CSV data. Local execution, no data leaves the machine.

Quick Start

# Bar chart with CJK support
python3 scripts/gen_figure.py -t bar -d data.json -o figure.png --cjk \
  --title "图2 主标题 / Subtitle" --ylabel "准确率 Accuracy (%)"

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

# Scatter with trend line
python3 scripts/gen_figure.py -t scatter -d data.csv -o scatter.png \
  --xlabel "Baseline (%)" --ylabel "Gain (%)" --theme nature

Chart Types

Type Command Key Features
Bar -t bar Grouped bars, error bars, significance brackets
Heatmap -t heatmap Cell annotations, custom colormap, colorbar
Scatter -t scatter Trend line, r value, color grouping, mean points
Line -t line Multiple series, error bands, markers
Box -t box Box-and-whisker, jitter points
Forest -t forest CI whiskers, overall diamond, ref line
Violin -t violin Density estimation, inner mean/median

Color Themes

  • --theme nature — Nature journal palette (vibrant, distinct)
  • --theme lancet — Lancet medical palette (bold, high-contrast)
  • --theme conservative — Professional muted (safe for any field)
  • --theme default — Balanced, versatile

CJK / Chinese Support

Pass --cjk to auto-detect and load system CJK fonts. Zero manual configuration needed.

python3 scripts/gen_figure.py -t bar -d data.json -o fig.png --cjk

Font detection priority: Noto Sans CJK → PingFang → Microsoft YaHei → WQY → AR PL → Droid.

For custom font: --cjk-font /path/to/font.ttf

Data Input

JSON (full features) or CSV (basic). See references/data-formats.md for complete schema per chart type.

JSON bar chart example:

{
  "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"}
}

Key Flags

Flag Description
--title "text" Figure title. Supports `\
for newline (works in shell with$'line1\
line2'` or when called from Python)
--xlabel, --ylabel Axis labels
--width N, --height N Figure size in inches
--show-values Show numeric labels on bars
--no-trend Hide trend line (scatter)
--no-legend Hide legend
--cmap NAME Colormap (heatmap)
--vmin, --vmax Value range (heatmap)

Output

  • .png — 300 DPI raster (default)
  • .svg — Vector (pass .svg extension to --out)

When Agent Generates Figures (Not CLI)

If creating a figure via Python script rather than CLI:

  1. Always call detect_cjk_font() first if any label may contain CJK
  2. Use fontproperties=font_prop on all text-setting calls with CJK content
  3. Set plt.rcParams['axes.unicode_minus'] = False (prevents minus sign boxes)
  4. Verify output: file size > 20KB for multi-label charts indicates font loaded
  5. Preferred output: PNG at 300 DPI, bbox_inches='tight', white background
安全使用建议
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 that the agent's execution environment has no unusual mounts or network proxies that could expose input/output files.
功能分析
Type: OpenClaw Skill Name: academic-figures Version: 1.0.0 The skill bundle is a legitimate tool for generating academic figures using Matplotlib. The scripts (scripts/gen_figure.py and scripts/detect_cjk_font.py) perform local data processing and font detection without any network activity, data exfiltration, or suspicious execution patterns. The instructions in SKILL.md are strictly aligned with the stated purpose of rendering charts and handling CJK characters correctly.
能力评估
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
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.
Credentials
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.
Persistence & Privilege
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install academic-figures
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /academic-figures 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
v1.0.0 initial release: 7 chart types, 4 themes, CJK auto-detect, CSV long-format support, 300dpi+SVG
元数据
Slug academic-figures
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Academic Figures 是什么?

Generate publication-quality academic figures from data with one command. Supports 7 chart types (bar, heatmap, scatter, line, box, forest, violin), 4 color... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 54 次。

如何安装 Academic Figures?

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

Academic Figures 是免费的吗?

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

Academic Figures 支持哪些平台?

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

谁开发了 Academic Figures?

由 docsor1212(@docsor1212)开发并维护,当前版本 v1.0.0。

💬 留言讨论