FunctionRacerProblemsRace

Two Lines, One Chart

BeginnermatplotlibPython

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
The chart to draw in example 1 of Two Lines, One Chart

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