FunctionRacerProblemsRace

Layers

HardmatplotlibPython

rows holds one series per name, all measured at the same xs. Draw them as a stacked area chart: the first series as an area standing on 0, each next one as an area on top of the ones before, so that the top edge shows the total. Label each area with its name and show the legend. Return the figure.

Checked: the filled areas and the legend.

Example 1

xs [1,2,3]
rows [[1,2,3],[3,2,1]]
names ["north","south"]
draws
The chart to draw in example 1 of Layers

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