Paper-Plot-Skills: Let AI Draw Your Paper Figures — From the Matplotlib Tuning Hell to One-Sentence Plotting
> GitHub: https://github.com/Trae1ounG/paper-plot-skills > Author: Trae1ounG (CUHK-Shenzhen) > Positioning: An AI Skill toolbox for reproducing and generating academic paper figures
---
1. A Breakdown Moment Every Researcher Knows
Your experiment worked great. Now you need a bar chart comparing baselines against your method for the paper.
You open matplotlib, write 50 lines of code, and get:
- Default blue with zero visual distinction
- System default sans-serif fonts that clash with the paper
- Wrong bar spacing — too wide looks empty, too narrow looks cramped
- No error bars, no significance markers, no legend
- PNG saved with white margins, insufficient dpi, blurry when zoomed
- Bar charts: comparison experiments (A vs. B), ablations (5 variants)
- Line charts: training curves, performance vs. hyperparameters, scaling laws
- Scatter plots: visualizations (t-SNE/UMAP), distribution comparisons
- Radar charts: multi-dimensional method comparison (accuracy, speed, memory, generalization...)
- serif (Times New Roman style): traditional, formal, academic — favored by classic CV/ML venues (early ICCV, NeurIPS)
- sans-serif (Arial/Helvetica style): modern, clear, screen-friendly — favored by newer venues and systems papers
- LaTeX Computer Modern: matching body text is the most professional choice when writing in LaTeX
- Print-friendly: many papers are printed in grayscale; palettes must survive it
- Colorblind-safe: red-green colorblindness affects ~8% of men; never rely on red vs. green alone
- Distinctness: 3–5 series per figure, each identifiable at a glance
- Subtle: charts support the data; they must not distract
- Most journals require 300 dpi (print quality)
- Some require 600 dpi (line art)
- Web display needs only 72–150 dpi
- A user uploaded a paper screenshot (issue #1)
- The AI detected table layout, two-row results, strong/weak highlight backgrounds
- Generated script:
plot-from-image/scripts/classwise_iou_table.py - The reproduced figure is nearly identical to the original
- See a beautiful figure in a paper and want a similar style in yours — no manual tuning, just reproduce
- A reviewer says your figure looks too similar to another paper's — show the script to demonstrate independent implementation
- Your advisor says "reference top-conference style" — just feed a screenshot to the AI
- Paired bars + gain arrows (MemEvolve): not solvable by standard templates
- L-shaped spines + axis-end arrows + right inset (SiameseNorm): requires tuning many parameters by hand
- Broken X-axis + multiple marker types (Meta-Harness): broken axes are already an advanced matplotlib technique
- Font family and sizes
- Spine style and tick direction
- Palette and contrast strategy
- Annotation approach (arrows, value labels, legend placement)
- Layout structure (single plot, subplots, insets)
- Trae1ounG (2026). Paper-Plot-Skills. https://github.com/Trae1ounG/paper-plot-skills
- Source papers of preset styles: MemEvolve, SPICE, Self-Distillation, DAPO, SiameseNorm, MemGen, Meta-Harness, DoRA
Two hours of tuning and ten StackOverflow threads later, it finally looks passable. But compared to the figures in the neighboring group's paper — still one tier below.
What's the problem? Not bad data, not weak experiments — you simply don't know how to tune matplotlib. Paper figures aren't "plotting the data"; they are visual storytelling. Fonts, colors, spacing, annotations, and layout all shape a reviewer's first impression.
Trae1ounG's paper-plot-skills solves exactly this. It doesn't teach you to tune matplotlib — it packages "top-conference figure aesthetics" into AI Skills you invoke with one sentence.
---
2. Core Design: Distilling "Style Parameters" from 9 Real Paper Figures
The core insight: top papers' figure styles are highly consistent — and can be systematically extracted.
The author selected nine figures with instructive plotting styles from papers he read, then did two things:
1. Style Decomposition: Each Figure Is a Parameter System
Example: the bar chart from the MemEvolve paper:
| Style dimension | Parameters | |---|---| | Font | serif (Times New Roman style), the classic paper look | | Layout | paired bars — baseline and method side by side | | Annotations | gain arrows + percentages, showing improvement directly | | Y-axis | independent scales per subplot, no forced unification | | Palette | low-saturation contrast, avoiding gaudiness |
Example: the training curve from the DAPO paper:
| Style dimension | Parameters | |---|---| | Font | sans-serif, modern and clean | | Reference lines | horizontal dashed lines marking key thresholds | | Break lines | vertical dashed lines marking key training events | | Spines | four-sided frame, outward ticks, professional look | | Legend | placed independently, never covering curves |
These parameters are written as .md documents (bar_paired_delta.md, line_training_curve.md, etc.), each paired with a matplotlib script template.
2. Two Usage Modes
Mode 1: plot-from-data — "plot my data in this style"
You say: "Plot my data in bar_grouped_hatch style."
The AI will:
1. Read the bar_grouped_hatch.md style parameters
2. Read your data (CSV / JSON / plain text)
3. Fill the template script and generate a dpi=300 publication-ready figure
Mode 2: plot-from-image — "reproduce this figure for me"
You upload a paper screenshot, and the AI: 1. Analyzes aspect ratio, fonts, colors, and layout structure 2. Infers the corresponding matplotlib parameters 3. Generates a reproducible Python script
---
3. Nine Preset Styles Covering the Most Common Paper Chart Types
| Style | Type | Source paper | Key features |
|---|---|---|---|
| bar_paired_delta | Bar | MemEvolve | Paired bars + gain arrows, serif font |
| bar_grouped_hatch | Bar | SPICE | Grouped bars + hatched main method, value labels on top |
| line_confidence_band | Line | Self-Distillation | EMA smoothing + confidence-band shading, LaTeX fonts |
| line_training_curve | Line | DAPO | Vertical break lines + horizontal reference lines, sans-serif |
| line_loss_with_inset | Line | SiameseNorm | L-shaped spines + axis-end arrows + right-side zoom inset |
| scatter_tsne_cluster | Scatter | MemGen | t-SNE clusters + rounded colored annotation boxes, dotted grid |
| scatter_broken_axis | Scatter | Meta-Harness | Broken X-axis dual panels, multiple marker types |
| radar_dual_series | Radar | DoRA | Regular-octagon dashed concentric grid, two-method comparison |
These cover ~80% of figure scenarios in ML/AI papers:
---
4. Technical Details: Why These "Style Parameters" Matter
4.1 Fonts: serif vs. sans-serif is a field convention, not taste
Each style in paper-plot-skills specifies fonts consistent with its source paper, not randomly chosen.
4.2 Spine design: L-shape vs. four-sided frame is an information-density choice
| Spine style | Best for | Impression | |---|---|---| | Four-sided | Line charts needing precise reading | Rigorous, engineering-oriented | | L-shape (left + bottom) | Trend-focused curves | Clean, modern | | Frameless (axes only) | Minimalist visualization | Premium, designed | | Open frame | Grouped comparisons | Open, comparative |
line_loss_with_inset uses L-shape + axis-end arrows; bar_grouped_hatch uses an open frame — deliberate choices matching each source paper.
4.3 Palette: not "pretty," but "distinguishable + printable + colorblind-safe"
All palettes are extracted from real papers and already filtered through these constraints.
4.4 dpi=300 is not arbitrary
paper-plot-skills defaults to 300 dpi, satisfying most journal requirements with no post-hoc upscaling.
---
5. plot-from-image: From Screenshot to Script
The pipeline:
1. Input: a paper screenshot (PDF capture or even a phone photo of a screen)
2. Analysis: the AI identifies elements — number of bars/curves, colors, fonts, layout
3. Inference: visual features are translated into matplotlib parameters
4. Output: a .py script that reproduces the original figure
A real case: classwise_iou
Why this matters:
---
6. Feynman Perspective: What Is This Project, Really?
Q1: How is this different from plain matplotlib templates?
Templates like seaborn's paper context only solve basics — font size, line width, color cycle. Paper-figure aesthetics go far beyond:
The value proposition: packaging "advanced matplotlib techniques" into one-sentence-invocable Skills — not just preset parameters, but preset "aesthetic judgment."
Q2: What role does the AI play?
In plot-from-data, the AI does parameter injection + template rendering: it reads the .md spec for your chosen style, fills your data into the template, and emits standard matplotlib code — not a black box.
In plot-from-image, the AI does visual analysis + parameter inference: recognizing elements and producing a reproducible script.
In both modes, the AI assists, not replaces. You still need to understand your data, pick the style, and judge the output.
Q3: What's the ceiling?
1. Style count: nine styles cover 80% of scenarios; specialized charts (manifold visualizations, network graphs, heatmaps) are uncovered. 2. Domain limits: styles come from ML/AI papers; biomedicine, physics, and chemistry have different conventions (error-bar styles, double-log axes). 3. Interactive charts: papers are usually static, but HTML interactive figures are gaining acceptance; only static matplotlib output is supported. 4. Ecosystem lock-in: some fields use ggplot2 (R), Plotly (interactive), or TikZ (native LaTeX); only matplotlib is supported.
Q4: The most valuable lesson is the "aesthetic decomposition" methodology
The most valuable part is not the nine scripts but the method of decomposing figures — systematically extracting from any paper figure:
This methodology applies to any visualization tool. Even without paper-plot-skills, reading this project teaches you to critique your own figures with a professional eye.
---
7. Use Cases and Recommendations
| Scenario | Recommended mode | Why |
|---|---|---|
| Have experiment data, need a comparison chart | plot-from-data + bar_paired_delta | Most common, immediate impact |
| Love a figure in a paper, want the style | plot-from-image | Upload the screenshot, auto-analysis |
| Need t-SNE visualization for a paper | plot-from-data + scatter_tsne_cluster | Professional cluster annotations |
| Ablation with 5 methods | plot-from-data + bar_grouped_hatch | Grouped bars + hatching, clear separation |
| Training curve, show convergence | plot-from-data + line_confidence_band | EMA smoothing + confidence band |
| Multi-dimensional method comparison | plot-from-data + radar_dual_series | Radar chart, 8 dimensions at a glance |
---
8. One-Sentence Summary
> Paper-Plot-Skills' core insight: paper-figure quality is determined not by data but by aesthetic parameters. Nine styles distilled from real top-conference papers turn matplotlib's "tuning hell" into "one-sentence plotting," and plot-from-image compresses the "see a good figure → reproduce the style" cycle from hours to minutes. Researchers should spend time on experiments, not on color palettes.
---
References