Generate a paper-quality figure by picking a style template and filling it with user data. All outputs are dpi=300 PNG.
Available Styles
| Style | Type | Script | Applicable scenarios |
|---|---|---|---|
bar_paired_delta |
Bar chart | scripts/bar_memevolve.py |
Baseline vs method paired comparison + gain arrows |
bar_grouped_hatch |
Bar chart | scripts/bar_spice.py |
Multi-method ablation, main method with diagonal hatching, values on top of bars |
line_confidence_band |
Line chart | scripts/line_selfdistill.py |
Training curves with confidence intervals |
line_training_curve |
Line chart | scripts/line_aime.py |
Vertical break line + horizontal reference line |
line_loss_with_inset |
Line chart | scripts/line_loss_inset.py |
L-shaped spine + local zoom inset |
scatter_tsne_cluster |
Scatter plot | scripts/scatter_tsne.py |
t-SNE clustering + annotation box |
scatter_broken_axis |
Scatter plot | scripts/scatter_break.py |
Broken X axis, multi-marker series |
radar_dual_series |
Radar chart | scripts/radar_dora.py |
Two-method multi-dimensional comparison, regular octagon grid |
Workflow
1. 确认用户的图类型和数据
2. 选择对应 style(如不确定,询问用户或根据数据形状推断)
3. 读取对应 references/<style_name>.md 获取精确参数
4. 复制对应 scripts/<script>.py,替换数据区(脚本顶部有清晰注释标注数据区)
5. 运行:python3 scripts/<script>.py
6. 检查输出,必要时微调颜色/标签/字号
Data Substitution Tips
The data section of each repro script is at the top of the file, usually np.array(...) or a dictionary. Replacement rules:
- Keep array dimensions and types unchanged
- If the number of categories changes (e.g., from 4 groups to 6 groups), adjust the color list and width calculation accordingly
- Directly modify the corresponding string lists for x-axis labels and legend labels
Detailed Style Parameters
Read the corresponding file in references/ for exact rcParams, colors, font sizes, spine settings, and tick directions before generating:
- Bar:
references/bar_paired_delta.md,references/bar_grouped_hatch.md - Line:
references/line_confidence_band.md,references/line_training_curve.md,references/line_loss_with_inset.md - Scatter:
references/scatter_tsne_cluster.md,references/scatter_broken_axis.md - Radar:
references/radar_dual_series.md