First Line
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

Constraints
2 <= len(xs) == len(ys) <= 30
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More matplotlib problems
- How the Values SpreadBeginner
- Name the ChartBeginner
- Sideways BarsBeginner
- Slices of the WholeBeginner
- Two Lines, One ChartBeginner
- Dashed and DottedEasy
- Gains and LossesEasy
- Grid and LegendEasy