File size: 3,225 Bytes
a9e4fef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
license: mit
task_categories:
- text-generation
language:
- en
tags:
- matplotlib
- seaborn
- data-visualization
- rl-environment
- verifiers
- code
size_categories:
- n<1K
---

# matplotlib-tasks-v1

Task dataset for a Matplotlib/Seaborn RL / eval environment, in the shape used by the
[Prime Intellect Environments Hub](https://app.primeintellect.ai/dashboard/environments).

27 plotting tasks over a fixed set of small datasets. The model builds the figure, then reads
the answer back off the axes; the grade is an exact row comparison against a reference.
Deterministic — no LLM judge, no external API, no network, **and no pixels**.

| Category | Tasks | Covers |
|---|---|---|
| line_plots | 6 | ydata/xdata readback, multiple lines, legend texts, linestyle and marker, plotting a derived series |
| axes_config | 6 | explicit limits, title and axis labels, explicit ticks, subplot grids, log scale, limits not filtering data |
| bar_charts | 5 | heights, widths, `barh`, stacked bars via `bottom`, explicit tick labels |
| statistical | 5 | histogram counts and edges, custom bin edges, scatter offsets, boxplot median and whiskers |
| seaborn | 5 | `lineplot` passthrough, `barplot` group means, `barplot` with `estimator="sum"`, `scatterplot` collections, `histplot` patch heights |

## ⚠ Why this dataset does not compare images

Image comparison is the obvious way to grade a plot and the wrong one: it fails on font
hinting, DPI, backend and antialiasing long before it tests whether the model plotted the right
thing. Here the model builds the figure and the grade reads values back off the artists.

That still leaves a determinism trap, and it was **measured** on matplotlib 3.11.1, not assumed:

```
ln.get_color()  ->  (0.1215…, 0.4666…, 0.7058…)   from the STYLE CYCLE — version-dependent
ax.get_xlim()   ->  (-0.2, 4.2) after autoscale   depends on margin defaults
ln.get_ydata()  ->  exactly what was passed in    stable
hist counts     ->  computed from the data        stable
ax.get_xlim()   ->  after ax.set_xlim(0, 10)      stable — the task set it
```

**Every task therefore grades only:** user-supplied data, computed values, and properties the
task itself sets explicitly. Never a default colour, never an autoscaled limit, never an
automatic tick location.

## Fields

| Field | Description |
|---|---|
| `task_id` | stable id, e.g. `mpl-017` |
| `category` | one of the five above |
| `prompt` | the natural-language instruction |
| `data_description` | the preloaded variables, as shown to the model |
| `data` | those variables as JSON, so the task is self-contained |
| `expected_output` | `{"rows": [[...]]}` — the reference result |

## Verification

Every task is independently checked: it runs, is deterministic **across two freshly built
figures**, returns a non-empty list of JSON-safe primitives — which catches an Artist or numpy
scalar leaking out instead of a plain value — contains no NaN/inf, and survives the
serialisation round-trip exactly. All 27 pass on matplotlib 3.11.1 / seaborn 0.13.2 with the
Agg backend.

Builder and verifier:
[`build_tasks.py`](https://github.com/eltociear/my-molt-agent/blob/main/environments/matplotlib_env/build_tasks.py).