Recall & Review
beginner
What is a horizontal grouped bar chart?
A horizontal grouped bar chart shows bars side-by-side along the horizontal axis. Each group represents a category, and bars within a group represent sub-categories. It helps compare multiple groups across categories.
Click to reveal answer
intermediate
How do you control the position of bars in a horizontal grouped bar chart in matplotlib?
You control bar positions by setting the y-values with an offset for each group. Use numpy arrays and add/subtract a fixed height to shift bars side-by-side vertically.
Click to reveal answer
beginner
Which matplotlib function is used to create horizontal bars?
The function plt.barh() creates horizontal bars in matplotlib.
Click to reveal answer
beginner
Why use horizontal grouped bars instead of vertical grouped bars?
Horizontal bars are easier to read when category names are long or when you want to emphasize comparison across categories horizontally.
Click to reveal answer
intermediate
What parameters are important to set for clear horizontal grouped bars?
Important parameters include bar height (height in barh), y positions with offsets, colors for groups, and labels for clarity.
Click to reveal answer
Which matplotlib function creates horizontal bars?
✗ Incorrect
plt.barh() is used for horizontal bars, while plt.bar() is for vertical bars.
In a horizontal grouped bar chart, how do you place bars side-by-side?
✗ Incorrect
Bars are placed side-by-side by adjusting their y positions with offsets.
What does each group in a grouped bar chart represent?
✗ Incorrect
Each group represents a category containing multiple sub-categories shown as bars.
Why might you choose horizontal bars over vertical bars?
✗ Incorrect
Horizontal bars help display long category names more clearly.
Which parameter controls the thickness of bars in plt.barh()?
✗ Incorrect
In plt.barh(), the 'height' parameter controls the thickness of the bars.
Explain how to create a horizontal grouped bar chart using matplotlib.
Think about how to position bars side-by-side horizontally.
You got /5 concepts.
Describe when and why you would use horizontal grouped bars instead of vertical grouped bars.
Consider the visual clarity and label length.
You got /4 concepts.