Sideways Bars
Long names read better on the side. Draw a horizontal bar chart: one bar per name, with the bar of names[i] reaching values[i] to the right. Return the figure.
Checked: the bars and the y tick labels.
Example 1
names ["tea","milk","jam"]
values [3,5,2]
draws

Constraints
1 <= len(names) == len(values) <= 10- The names are all different
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More matplotlib problems
- Slices of the WholeBeginner
- Two Lines, One ChartBeginner
- Dashed and DottedEasy
- Gains and LossesEasy
- Grid and LegendEasy
- Growth on a Log ScaleEasy
- Label the PeakEasy
- Mark the AverageEasy