FunctionRacerProblemsRace

Gains and Losses

EasymatplotlibPython

Draw a bar chart of values by name in which every bar that is 0 or more is "green" and every bar below 0 is "red". Return the figure.

Checked: the bars and the bar colors.

Example 1

names ["tea","milk","jam"]
values [3,-5,2]
draws
The chart to draw in example 1 of Gains and Losses

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