matplotlib-tasks-v1 / README.md
eltociear's picture
dataset card
a9e4fef verified
|
Raw
History Blame Contribute Delete
3.23 kB
metadata
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.

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.