Two Lines, One Chart
Draw a and b as two lines against xs on the same chart. Label the first line name_a and the second name_b, and show a legend so the reader can tell them apart. Return the figure.
Checked: the lines with their labels and the legend.
Example 1
xs [1,2,3]
a [2,4,6]
b [6,4,2]
name_a "up"
name_b "down"
draws

Constraints
2 <= len(xs) <= 30
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More matplotlib problems
- Dashed and DottedEasy
- Gains and LossesEasy
- Grid and LegendEasy
- Growth on a Log ScaleEasy
- Label the PeakEasy
- Mark the AverageEasy
- Names on the AxisEasy
- Side by SideEasy