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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.

expected_output: {"rows": [["squares", "down"]]}


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.

expected_output: {"rows": [["alpha", "beta", "gamma", "delta"]]}


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.


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):

    x      = [0, 1, 2, 3, 4, 5, 6, 7]
    y      = [0, 1, 4, 9, 16, 25, 36, 49]        (x squared)
    y2     = [7, 6, 5, 4, 3, 2, 1, 0]            (descending)
    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]

matplotlib uses the "Agg" backend. Build the figure, then read the answer back off the axes.