matplotgym
- Tasks
- 668
- Papers
- 265
- Measured
- Oct 2026
A scientific paper starts and ends with its figures. While language models can reason through increasingly difficult scientific problems and can generate artifacts when the task is well specified, we find that they struggle to generate quality scientific figures given a claim and data. We built matplotgym to quantify this gap.
Each task in matplotgym gives an agent a paper's released data and a one-line claim, and scores how close its figure comes to the one the authors drew. The agent must decide which data to keep, how to aggregate them, and how to encode them to substantiate a quantitative claim. A well-drawn figure of the wrong subset supports a different conclusion, and is appropriately scored poorly. Even the strongest model averages 58 out of 100, and no model solves more than 34 of the 668 tasks on every attempt.
Overall
Mean: average score out of 100, ± standard error. Field-balanced: every field weighted equally. Solved: ≥ 95 on all three attempts.
| Model | Mean score | Field-balanced | Solved | Cost / task |
|---|---|---|---|---|
GPT-6 AstraOpenAI | 58.0±0.9 | 57.0 | 26 | $0.519 |
Claude Opus 5Anthropic | 56.5±0.7 | 56.2 | 1 | $0.435 |
Claude Sonnet 5Anthropic | 56.1±1.0 | 54.6 | 34 | $0.118 |
GPT-5.5OpenAI | 55.9±0.8 | 54.1 | 4 | $0.392 |
GPT-5.1OpenAI | 51.3±0.9 | 49.0 | 22 | $0.075 |
gpt-oss-120bOpenAI · open weights | 50.7±1.0 | 48.3 | 27 | $0.008 |
Qwen3.8-27BOpen weights | 49.3±1.0 | 45.9 | 12 | $0.042 |
Gemma 4 31BOpen weights | 44.1±1.1 | 41.8 | 27 | $0.009 |
Claude Haiku 4.5Anthropic | 31.8±0.9 | 30.2 | 9 | $0.441 |
Tasks by field
Each bar is one task: its mean score across the nine models, with a whisker of one standard deviation. Among fields with 20 or more tasks, biology is the easiest (54) and Earth & climate the hardest (45).
Which tasks separate the models
Spread is the standard deviation of the nine models' scores on a task; the median task's is 16.
By decision
| Model | Data selectionData | EncodingChart | OverlaysOverlay | Panel structurePanels | Axis scalesAxes | Series coverageSeries |
|---|---|---|---|---|---|---|
GPT-6 Astra | 43 | 72 | 80 | 54 | 50 | 75 |
Claude Opus 5 | 38 | 77 | 88 | 55 | 45 | 69 |
Claude Sonnet 5 | 46 | 63 | 70 | 53 | 44 | 74 |
GPT-5.5 | 39 | 70 | 85 | 56 | 48 | 73 |
GPT-5.1 | 40 | 59 | 69 | 51 | 38 | 73 |
gpt-oss-120b | 43 | 57 | 54 | 50 | 37 | 73 |
Qwen3.8-27B | 39 | 58 | 59 | 44 | 37 | 65 |
Gemma 4 31B | 38 | 49 | 39 | 40 | 34 | 63 |
Claude Haiku 4.5 | 26 | 36 | 27 | 27 | 26 | 45 |
Cost vs. score
Scores are mean reward × 100 over 668 tasks, three attempts per model on each (18,036 scored episodes). Cost is per task at three attempts: tokens counted from each transcript at OpenRouter list prices on 23 October 2026, with no caching or batch discount. Hidden reasoning tokens are not in the transcripts, so for reasoning models cost is a lower bound.
1. Overview
matplotgym measures whether an agent can turn a scientific dataset into the figure the paper's authors drew. Each of the 668 tasks comes from a published paper whose authors released both their data and the code that drew the figure. The agent receives the data and a one-sentence claim, and decides what to plot.
The benchmark tests analytical judgment, not plotting skill. What separates the models is choosing the right subset, aggregation, encoding and panel layout. Nine models were evaluated with three attempts per task, for 18,036 scored episodes. Hosted models ran through their providers' APIs and open-weight models through OpenRouter. The task list was frozen on 22 October 2026.
2. Source material
2.1 Real figures, real decisions
The reference is the figure produced by running the authors' own plotting code, unmodified, on their released data. We do not redraw, simplify or invent figures. The ground truth is a decision a working scientist made about their own results. The authors' plotting code is used only to build the reference spec; it is not shipped with the task.
2.2 Raw data, not answers
The agent receives the rows as released, including columns and values the figure does not use. In the example task the data holds runs at two network sizes, and the authors plot only the 16-node runs. A gate blocks any task whose files contain a pre-aggregated table, a column named after the conclusion, or a header that describes the comparison.
2.3 Licensing
Every file (task.yaml, reference_spec.json and
the workspace) is under a license that permits commercial use. We check each task's shipped
files rather than the repository as a whole, and read each upstream's own terms.
3. What is tested
3.1 Six decisions
Every task is scored on the decisions below. A task exercises the ones its reference figure makes.
| Code | Decision | Weight |
|---|---|---|
| D1 | Data selection | 0.37 |
| D2 | Encoding | 0.21 |
| D3 | Overlays | 0.15 |
| D4 | Panel structure | 0.10 |
| D5 | Axis transforms | 0.10 |
| D6 | Series coverage | 0.07 |
A weight is that decision’s share of a task’s score; the six add up to 1. Each decision is scored from 0 to 1, and the task score is their weighted average. A task only counts the decisions its reference figure makes. When one is missing, its weight is dropped and the rest are scaled up to fill the gap. On a task with no overlays, for example, data selection counts for 0.37 / 0.85, about 44% of the score.
3.2 What each decision measures, and why
D1Data selection
Measures
Whether each plotted series holds the same values as the authors’: the same rows, filtered and aggregated the same way.
Why it matters
Choosing what to plot is the main analytical decision. A clean figure of the wrong subset supports a different claim.
D2Encoding
Measures
The chart type, which variable goes on each axis, what drives colour and size, and the category levels on each axis.
Why it matters
The same numbers read differently as bars or lines, and swapping the axes changes what is being compared. Axis roles carry half of this component.
D3Overlays
Measures
Error bars, confidence bands, fitted lines, reference lines and significance marks, on tasks where the authors drew them.
Why it matters
Without error bars, a reader can’t tell a real effect from noise. A fitted line or a threshold is often the finding itself: the trend, or the point where a curve crosses the line.
D4Panel structure
Measures
The number of panels, how the data is split across them, and insets.
Why it matters
The layout decides which series share a set of axes, and so which comparisons the reader can make directly.
D5Axis transforms
Measures
Log and symlog scales, and whether panels share axis limits.
Why it matters
A log scale or a shared axis changes what a difference looks like. It is scored only where the authors made one of these choices.
D6Series coverage
Measures
Whether every series the claim is read against is there, and no series the authors left out.
Why it matters
A figure missing its baseline can’t support the claim, and charging extras means plotting every column doesn’t pay.
3.3 What the claim gives away
The claim names the conditions and quantities at issue. It never names a chart type, an axis assignment or an aggregation, because those are the decisions under test.
3.4 Fields
The tasks span 11 fields. ML & systems and physics hold 203 each; clinical informatics and medical imaging hold 8 each, too few to rank models on alone. The results table can be split by field, and the leaderboard plots every task by field.
4. Environment interface
4.1 What the agent receives
The claim, a listing of its working directory, data/SCHEMA.md describing columns
and units, the data files, and a one-line make_figure.py stub. It never receives
the reference spec, the authors' plotting code, the published figure, or the task's list of
scored decisions.
4.2 Actions
One action per turn, as a fenced block: bash runs a shell command,
python runs a throwaway script, write <path> writes a file, and
done ends the episode. Python has numpy, pandas and matplotlib. The budget is 14
turns and 120 seconds per command.
The protocol is plain text and identical for every model. Native tool calling is off for all of them, so no provider's tool format is an advantage.
4.3 Submission
Only make_figure.py is scored. When the episode ends, the harness runs the script
again in a fresh process and scores the figure object it builds. The image the agent saved is
never looked at, and the agent sees no score during the episode.
5. Reward design
5.1 Structure
Both figures are reduced to a spec: panels, marks, the values each mark plots, axis scales and overlays. The six decisions are compared one by one and combined by weight. Decisions a task does not exercise leave the denominator, so a task with no error bars gives no credit for drawing none. A script that crashes or draws nothing scores 0.
5.2 More than one right answer
- Style is never read. Palette, fonts, figure size, tick placement, legend position and resolution appear nowhere in the scoring code. Nor do series order or plotting idiom.
- Near-equivalent encodings earn partial credit. Bars where the authors drew points, or a histogram drawn as bars, earn half on the chart-type signal rather than zero.
- Faithful additions cost less than omissions. An extra series costs half what a missing one costs. Leaving out what the claim is read against is a failure; adding context is at worst clutter.
- Units do not matter where shape does. Heatmaps and scalar fields are compared up to a change of scale and offset.
5.3 Where models lose points
Across all 18,036 episodes, choosing the wrong data accounts for 43% of lost reward, more than any other source.
| Source of lost reward | Share |
|---|---|
| D1 Data selection: wrong subset or aggregation | 43% |
| No figure: script crashed or was never written (2,218 episodes) | 21% |
| D2 Encoding: wrong chart type or axis roles | 14% |
| D5 Axis transforms | 8% |
| D4 Panel structure | 6% |
| D3 Overlays | 4% |
| D6 Series coverage | 4% |
5.4 Observed model failures
Across all episodes on the benchmark, we have observed the following failure modes:
5.4.1 Choosing the wrong data
- Plotting the right series with the wrong filter, subset or aggregation
- Reducing a series over time to a single average
- Plotting conditions or runs the authors left out
- Dropping a condition the authors plotted
5.4.2 Encoding the data differently
- Drawing a series as a different kind of mark
- Stacking bars the authors grouped, or joining points they left separate
- Dropping the colour mapping that tells conditions apart
5.4.3 Leaving out overlays
- Leaving out error bars or confidence bands
- Leaving out a fitted line or a reference line the claim is read against
5.4.4 Laying out panels differently
- Splitting one comparison across panels so the series no longer share axes
- Merging the authors’ panels into one crowded plot
- Dropping some of the authors’ panels
5.4.5 Choosing different axis scales
- Adding a log scale the authors didn’t use
- Using a linear scale where the authors used log
- Sharing axis limits across panels the authors scaled separately, or the reverse
5.4.6 Failing to complete the task
- Ending the episode without submitting
make_figure.py - Drawing the figure in a scratch command but never writing it to the submission
- Submitting a script that crashes
- Submitting a script that runs but draws nothing
6. False positives and reward hacking
A score is only useful if it cannot be earned without doing the task. Each item below says how we know.
- The agent cannot read the answer. Four static scans run on all 668 tasks, and a task that fails any of them is blocked: everything the agent can see is searched for the answer's tokens, the reference's derived columns are checked against the shipped ones, filenames and headers are linted, and claims that list their own answer are flagged. On the first release of 171 tasks we also audited every command and every output across its 6,147 episodes: no reference spec, hidden task field or author code ever reached an agent.
- The scorer cannot be tampered with. Scoring re-runs the submitted script after the episode, so a saved image or a printed number cannot stand in for a figure. On the first release, none of the 5,983 submitted scripts we could read imported the harness or patched matplotlib.
- A non-answer scores well below a real attempt. We build the lazy figures ourselves (plot every column, plot nothing, plot the raw table) and score them on all 668 tasks. A task where one of them scores too close to a real attempt is flagged, because it can no longer tell a non-answer from analysis.
- No credit for style or volume. The scoring code reads nothing cosmetic (5.2) and charges for extra series (D6), so neither polish nor plotting everything raises a score.
- The reward is deterministic. No model and no network call sits in the scoring path. We re-scored recorded scripts and got the same score on every run.
- Every task can be solved. Each reference, scored against itself, gets 1.000 on all 668 tasks, so no attempt is charged for a fault in the harness. We also check that each task can be solved in practice: a strong model is told the decisions the authors made (which rows, which chart, which panels) and asked to draw the figure. It has to score 0.80 or higher on a first or second try, or the task is dropped: if it cannot, the fault is in the task, not the model.
- Tasks separate the models. A task is only useful for ranking if models score differently on it. Across the nine models the median task has a spread of 16 points (the standard deviation of their mean scores), and 10 of the 668 tasks have a spread under 5, giving every model about the same score. The leaderboard plots each task's spread.
- The criteria are stated up front. The agent's prompt lists the decisions it is judged on and the ones it is not (palette, fonts, size, ticks, legend position). There is no hidden criterion.
7. Human review
The automated gates check that a task is solvable, discriminating and free of leaks. They cannot check that a claim is faithful to the paper, or that the rubric weighs mistakes the way a scientist would. So for a selected set of about twenty tasks, we met with the papers’ authors and ran a review in three parts.
7.1 Checking the claims
Each author read the claim for every task drawn from their paper, next to the figure it describes, and checked that it accurately describes what the figure shows. For the most part, authors confirmed their claims as written; where one flagged a problem, we made small wording changes to match.
7.2 Weighting the components
We then showed each author versions of their own figure with one component changed, such as a different chart type, a missing error bar or a log axis where they used linear. For each version, they told us how much the change mattered: whether the figure was still acceptable, acceptable but not ideal, or wrong. How strongly each kind of change moved their judgment tells us how much that component should count in the score. We use these judgments to make tweaks to the rubric score distribution.
7.3 Agreement between experts
To check that these judgments reflect more than one author’s taste, each expert also rated a shared set of figures from other tasks in the benchmark, altered the same way. Given each task’s claim, they answered the same question: still acceptable, acceptable but not ideal, or wrong. Because every expert rated the same figures, we can measure how far they agree on which changes matter.
8. Fairness invariants
An agent is charged only for a decision it could have made correctly from what it was given.
- One mistake costs once. The six decisions are scored independently, so a wrong choice is charged in the decision responsible and nowhere else.
- Only exercised decisions count. A decision the reference does not make is not scored.
- Format slips are not failures. The parser accepts a mislabelled code fence, such as
shforbash. A strict parser once cost one provider about 40% of its turns, which measured formatting rather than judgment. - One reminder to submit. An agent that ends with the stub untouched is told once that
only
make_figure.pyis scored. The reminder says nothing about the figure, and its turn counts against the budget. - The agent tests on the scorer's interpreter. The
pythonthe agent runs is the one that runs its script for scoring, with the same libraries. - Solved means every time. A task counts as solved only when all three attempts reach 95, so a single lucky attempt is not a solve. An earlier best-of-three rule rewarded variance: it credited the most erratic model with twice the solves of the highest-scoring one.
9. Limits
- Provider failures were re-run. About 1% of episodes ended on a provider error before the model had submitted anything. They were run again, and the scores use the re-runs. An episode the model ended itself, by refusing or by sending empty replies, counts as a 0.
- Two fields dominate the plain mean. ML & systems and physics hold 406 of the 668 tasks. The field-balanced mean is the better summary when comparing across fields.
- Small fields do not rank. Clinical informatics and medical imaging have 8 tasks each, and the results table marks them as too small to rank models on.
- Serving configuration matters. In earlier runs, the same open weights served at bf16 on local vLLM and at fp8 through a gateway differed by 9.1 points, so a rerun will only match these numbers on the same stack.
At 16 nodes, detection depends far more on the attack family than on training time; time-delayed poisoning collapses RL, DRL and MARL alike once its sleepers activate.
Five panels, one per attack family, with all three defenders in each. The poisoning panel marks activation at episode 25.
Right panels and activation line, but an extra summary panel and the 50-episode runs crowd the collapse.
Right data, split into fifteen one-line panels, so the defenders can't be compared on one set of axes.
Averages four attacks down to single numbers, hiding the change over training the claim is about.