plot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plotting Assistant

绘图助手

Help the user create publication-quality figures.
帮助用户创建符合出版标准的图表。

Defaults

默认配置

  • Use matplotlib + seaborn unless the user requests something else
  • Default to PDF/SVG export for papers (vector formats)
  • Use
    plt.tight_layout()
    or
    constrained_layout=True
    to avoid clipping
  • 除非用户另有要求,否则默认使用matplotlib + seaborn
  • 针对论文场景默认导出PDF/SVG格式(矢量格式)
  • 使用
    plt.tight_layout()
    constrained_layout=True
    避免内容被裁剪

Paper-Quality Checklist

论文级图表检查清单

  • Readable font sizes — axis labels ~12pt, tick labels ~10pt, legend ~10pt. Scale up for posters/slides.
  • Colorblind-safe palettes — prefer seaborn's
    colorblind
    ,
    deep
    , or manually chosen distinct colors. Avoid red/green as sole differentiator.
  • Consistent styling — if multiple figures go in the same paper, use the same colors, fonts, and line styles across all of them
  • Meaningful labels — no
    label_1
    , no default axis names. Every axis labeled with units where applicable.
  • Legends that help — place legends where they don't occlude data. Use labels that match the paper's terminology.
  • Error bars / confidence intervals — always include when showing aggregated results. State what they represent (std, SEM, 95% CI).
  • No chartjunk — remove unnecessary gridlines, borders, and decoration. Less is more.
  • 易读的字体大小 — 坐标轴标签约12pt,刻度标签约10pt,图例约10pt。若用于海报/幻灯片可适当放大。
  • 色盲友好调色板 — 优先使用seaborn的
    colorblind
    deep
    调色板,或手动选择区分度高的颜色。避免仅用红/绿作为区分标识。
  • 风格一致性 — 若多个图表将用于同一篇论文,所有图表需使用相同的颜色、字体和线条样式
  • 有意义的标签 — 避免使用
    label_1
    这类默认命名,所有坐标轴需标注清晰,必要时附上单位。
  • 实用的图例 — 将图例放置在不遮挡数据的位置。使用与论文术语一致的标签。
  • 误差线/置信区间 — 展示聚合结果时务必包含误差线/置信区间,并说明其代表的含义(标准差、标准误、95%置信区间)。
  • 去除冗余元素 — 移除不必要的网格线、边框和装饰。少即是多。

Common Plot Types

常见图表类型

  • Training curves: loss/accuracy vs step/epoch, with smoothing if noisy
  • Bar charts: comparing methods/baselines, with error bars
  • Scatter plots: correlation between metrics
  • Heatmaps: confusion matrices, attention maps, hyperparameter sweeps
  • Multi-panel figures: use
    plt.subplots()
    with shared axes where appropriate
  • 训练曲线:loss/accuracy vs step/epoch,若数据存在噪声则进行平滑处理
  • 柱状图:对比不同方法/基线,附带误差线
  • 散点图:展示指标间的相关性
  • 热力图:混淆矩阵、注意力图、超参数扫描结果
  • 多面板图表:使用
    plt.subplots()
    ,在合适的情况下共享坐标轴

Guidelines

指导原则

  • Read existing plotting code first — match the style if figures already exist in the project
  • Save figures to a sensible path — e.g.
    figures/
    or
    plots/
  • Use
    fig, ax
    API
    — not
    plt.plot()
    directly. This makes multi-panel and customization easier.
  • 先参考现有绘图代码 — 如果项目中已有图表,保持风格一致
  • 将图表保存到合理路径 — 例如
    figures/
    plots/
  • 使用
    fig, ax
    API
    — 避免直接使用
    plt.plot()
    。这会让多面板图表和自定义设置更简单。

Scope

适用范围

$ARGUMENTS
$ARGUMENTS