FunctionRacerProblemsRace

First Line

BeginnermatplotlibPython

Draw a line chart of ys against xs and return the figure.

Every chart starts the same way: fig, ax = plt.subplots() gives a figure and the chart inside it. Draw on ax, then return fig.

Checked: the lines.

Example 1

xs [1,2,3,4]
ys [2,4,3,6]
draws
The chart to draw in example 1 of First Line

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More matplotlib problems