BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 4: Data Visualization/Matplotlib Basics1/3
Exercise·7 min·10 XP

Bar Chart of Category Sales

Context. Four product categories, four sales totals. Bars are the natural way to compare categories side by side.

Your task. Write make_bar_chart(categories, sales) that draws one bar per category with its sales as the height, and returns the axes.

Example. Toys gets a bar of height 500, Books one of height 320, and so on.

Notes. Keep the categories in the order given. Return ax.

Previous
Plot a Revenue Trend
Next
Scatter Hours vs Scores