FunctionRacerProblemsRace

Grid and Legend

EasymatplotlibPython

Draw ys against xs as a line labeled name. Turn the grid on so values can be read off, and show the legend. Return the figure.

Checked: the lines with their labels, the legend and the grid.

Example 1

xs [1,2,3,4]
ys [2,4,3,7]
name "sales"
draws
The chart to draw in example 1 of Grid and Legend

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