SuperAPI AI Directory

paper-plot

Design & creation

View repository

Updated 10-16 14:55

About this skill

Paper Plot

Produce paper-quality matplotlib figures, either by filling a pre-built style with your data or by reproducing an uploaded paper figure. All outputs are dpi=300 PNG.

<skill-dir> below is this skill's directory — substitute the absolute path announced when the skill loads. On Windows, prefix script runs with PYTHONUTF8=1 when reading/writing UTF-8 (see resources).

Pick a mode

You have… Mode Read
Data + a target style (or a style name) from-data references/modes/from-data.md
A paper figure image to recreate from-image references/modes/from-image.md

If unsure which style fits the data, from-data explains how to infer it from the data shape; from-image explains how to match an image to a style or build from scratch.

Style catalog (from-data)

Style Type Script Use cases
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 boxes
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 multidimensional comparison, regular octagon grid

Per-style exact parameters (rcParams, colors, font sizes, spines, ticks) live in references/styles/<style>.md — read the matching file before generating.

Running a script

# default output name in the current directory:
python <skill-dir>/scripts/<script>.py
# or choose the output path:
python <skill-dir>/scripts/<script>.py my_figure.png

Each script embeds its data near the top (clearly marked) — copy the script, swap the data block, then run. The output path is argv[1] (defaults to a *_repro.png name in the working directory). line_selfdistill.py emits two figures (argv[1], argv[2]).

Dependencies & caveats

  • Needs matplotlib, numpy. scatter_break.py also needs scipy; the usetex=True styles (bar_grouped_hatch, line_confidence_band, line_loss_with_inset, scatter_tsne_cluster) require a working LaTeX install — swap to text.usetex: False if LaTeX is unavailable.

Resources

  • Modes: references/modes/from-data.md, references/modes/from-image.md
  • Styles: references/styles/ — 8 parameter files
  • From-scratch analysis: references/reproduction_guide.md
  • Scripts: scripts/ — 8 style scripts + classwise_iou_table.py (from-image example)
  • Gallery: assets/originals/ — 10 paper figures used to derive the styles (visual reference for from-image matching)