matplotlib-tasks-v1 / train.jsonl
eltociear's picture
add 27 verified matplotlib/seaborn tasks
45d42a9 verified
Raw
History Blame Contribute Delete
31.9 kB
{"task_id": "mpl-000", "category": "line_plots", "prompt": "Plot y against x on a new Axes. Return a single row containing the line's ydata as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 1.0, 4.0, 9.0, 16.0, 25.0, 36.0, 49.0]]}"}
{"task_id": "mpl-001", "category": "line_plots", "prompt": "Plot y against x, then y2 against x, on the same Axes. Return a single row [number of lines on the axes].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[2]]}"}
{"task_id": "mpl-002", "category": "line_plots", "prompt": "Plot y against x with label='squares' and y2 against x with label='down', then call ax.legend(). Return a single row with the two legend texts in order.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[\"squares\", \"down\"]]}"}
{"task_id": "mpl-003", "category": "line_plots", "prompt": "Plot y against x. Return a single row containing the line's xdata as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]]}"}
{"task_id": "mpl-004", "category": "line_plots", "prompt": "Plot y against x with linestyle='--' and marker='o'. Return a single row [linestyle, marker] as strings.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[\"--\", \"o\"]]}"}
{"task_id": "mpl-005", "category": "line_plots", "prompt": "Plot the CUMULATIVE SUM of y against x. Return a single row with the plotted ydata as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 1.0, 5.0, 14.0, 30.0, 55.0, 91.0, 140.0]]}"}
{"task_id": "mpl-006", "category": "bar_charts", "prompt": "Draw a bar chart of values against labels. Return a single row with the bar heights as floats, in order.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 7.5, 5.25, 2.0]]}"}
{"task_id": "mpl-007", "category": "bar_charts", "prompt": "Draw a bar chart of values against labels with width=0.5. Return a single row with the bar widths as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.5, 0.5, 0.5, 0.5]]}"}
{"task_id": "mpl-008", "category": "bar_charts", "prompt": "Draw a HORIZONTAL bar chart (barh) of values against labels. Return a single row with the bar widths as floats, in order.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 7.5, 5.25, 2.0]]}"}
{"task_id": "mpl-009", "category": "bar_charts", "prompt": "Draw a stacked bar chart: first values, then values again on top using bottom=values. Return a single row [number of patches, height of the first patch as a float, bottom (y) of the LAST patch as a float].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[8, 3.0, 2.0]]}"}
{"task_id": "mpl-010", "category": "bar_charts", "prompt": "Draw a bar chart of values against labels, then set the tick labels explicitly to labels. Return a single row with the x tick label texts.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[\"alpha\", \"beta\", \"gamma\", \"delta\"]]}"}
{"task_id": "mpl-011", "category": "statistical", "prompt": "Draw a histogram of samples with bins=4. Return a single row with the bin counts as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 4.0, 2.0, 1.0]]}"}
{"task_id": "mpl-012", "category": "statistical", "prompt": "Draw a histogram of samples with bins=4. Return a single row with the bin EDGES as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[1.0, 3.0, 5.0, 7.0, 9.0]]}"}
{"task_id": "mpl-013", "category": "statistical", "prompt": "Draw a scatter of y against x. Return a single row with the flattened offsets as floats, i.e. [x0, y0, x1, y1, ...].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 0.0, 1.0, 1.0, 2.0, 4.0, 3.0, 9.0, 4.0, 16.0, 5.0, 25.0, 6.0, 36.0, 7.0, 49.0]]}"}
{"task_id": "mpl-014", "category": "statistical", "prompt": "Draw a boxplot of samples. Return a single row [median, lower whisker value, upper whisker value] as floats, read from the returned dict.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 1.0, 5.0]]}"}
{"task_id": "mpl-015", "category": "statistical", "prompt": "Draw a histogram of samples with bins=[0, 3, 6, 10]. Return a single row with the bin counts as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 6.0, 1.0]]}"}
{"task_id": "mpl-016", "category": "axes_config", "prompt": "Plot y against x, then set the x limits to (0, 10) and the y limits to (-5, 60). Return a single row [xmin, xmax, ymin, ymax] as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 10.0, -5.0, 60.0]]}"}
{"task_id": "mpl-017", "category": "axes_config", "prompt": "Plot y against x and set the title to 'Squares', the x label to 'n' and the y label to 'n^2'. Return a single row [title, xlabel, ylabel].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[\"Squares\", \"n\", \"n^2\"]]}"}
{"task_id": "mpl-018", "category": "axes_config", "prompt": "Plot y against x and set the y ticks explicitly to [0, 10, 20, 30, 40, 50]. Return a single row with the y tick positions as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 10.0, 20.0, 30.0, 40.0, 50.0]]}"}
{"task_id": "mpl-019", "category": "axes_config", "prompt": "Create a figure with 2 rows and 3 columns of subplots. Return a single row [number of axes on the figure, number of rows, number of columns] as ints, reading rows and columns from the first axes' subplotspec.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[6, 2, 3]]}"}
{"task_id": "mpl-020", "category": "axes_config", "prompt": "Plot y against x on a log-scaled y axis (set_yscale('log')). Return a single row [the y axis scale name].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[\"log\"]]}"}
{"task_id": "mpl-021", "category": "axes_config", "prompt": "Plot y against x, then set the x limits to (2, 6). Return a single row with the ydata of the line — note the limits do NOT filter the data.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 1.0, 4.0, 9.0, 16.0, 25.0, 36.0, 49.0]]}"}
{"task_id": "mpl-022", "category": "seaborn", "prompt": "Use seaborn.lineplot to plot y against x on a new Axes. Return a single row with the resulting line's ydata as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[0.0, 1.0, 4.0, 9.0, 16.0, 25.0, 36.0, 49.0]]}"}
{"task_id": "mpl-023", "category": "seaborn", "prompt": "Use seaborn.barplot with x=groups, y=gvals, errorbar=None. Return a single row with the bar heights as floats — these are the per-group MEANS seaborn computed.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 5.0]]}"}
{"task_id": "mpl-024", "category": "seaborn", "prompt": "Use seaborn.scatterplot with x=x, y=y. Return a single row [number of collections on the axes].", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[1]]}"}
{"task_id": "mpl-025", "category": "seaborn", "prompt": "Use seaborn.barplot with x=groups, y=gvals, estimator='sum', errorbar=None. Return a single row with the bar heights as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[9.0, 15.0]]}"}
{"task_id": "mpl-026", "category": "seaborn", "prompt": "Use seaborn.histplot on samples with bins=4. Return a single row with the patch heights as floats.", "data_description": "Preloaded data (plain Python lists / numpy arrays):\n\n x = [0, 1, 2, 3, 4, 5, 6, 7]\n y = [0, 1, 4, 9, 16, 25, 36, 49] (x squared)\n y2 = [7, 6, 5, 4, 3, 2, 1, 0] (descending)\n labels = [\"alpha\", \"beta\", \"gamma\", \"delta\"]\n values = [3.0, 7.5, 5.25, 2.0]\n samples = [1, 1, 2, 3, 3, 3, 4, 5, 5, 9]\n groups = [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"]\n gvals = [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]\n\nmatplotlib uses the \"Agg\" backend. Build the figure, then read the answer back off the axes.\n", "data": "{\"x\": [0, 1, 2, 3, 4, 5, 6, 7], \"y\": [0, 1, 4, 9, 16, 25, 36, 49], \"y2\": [7, 6, 5, 4, 3, 2, 1, 0], \"labels\": [\"alpha\", \"beta\", \"gamma\", \"delta\"], \"values\": [3.0, 7.5, 5.25, 2.0], \"samples\": [1, 1, 2, 3, 3, 3, 4, 5, 5, 9], \"groups\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"], \"gvals\": [1.0, 3.0, 3.0, 5.0, 5.0, 7.0]}", "expected_output": "{\"rows\": [[3.0, 4.0, 2.0, 1.0]]}"}