Recall & Review
beginner
What is the purpose of using subplots in data visualization?
Subplots allow you to display multiple charts in one figure. This helps compare different data views side by side easily.
Click to reveal answer
beginner
How do you create a 2x2 grid of subplots using matplotlib?
Use plt.subplots(2, 2) to create a figure with 4 subplots arranged in 2 rows and 2 columns.
Click to reveal answer
beginner
What does the 'axes' object represent when you create subplots?
The 'axes' object is the area where each individual chart is drawn. It lets you control each subplot separately.
Click to reveal answer
intermediate
How can you adjust the space between subplots?
Use plt.tight_layout() or fig.subplots_adjust() to add space between subplots so labels and titles don’t overlap.
Click to reveal answer
beginner
Why might you use subplots instead of separate figures?
Subplots keep related charts together in one view. This makes it easier to compare data and saves screen space.
Click to reveal answer
Which function creates multiple subplots in matplotlib?
✗ Incorrect
plt.subplots() creates a figure and a grid of subplots.
What does plt.subplots(3, 1) create?
✗ Incorrect
It creates 3 subplots stacked vertically in one column.
How do you access the second subplot in a 1D axes array from plt.subplots(2)?
✗ Incorrect
Indexing starts at 0, so the second subplot is axes[1].
Which method helps prevent overlapping labels in subplots?
✗ Incorrect
plt.tight_layout() automatically adjusts spacing to avoid overlaps.
If you want 4 subplots in a 2x2 grid, which call is correct?
✗ Incorrect
plt.subplots(2, 2) creates 4 subplots arranged in 2 rows and 2 columns.
Explain how to create and customize multiple charts using subplots in matplotlib.
Think about how to organize charts in a grid and control each one.
You got /4 concepts.
Describe why subplots are useful when analyzing data with multiple related charts.
Consider the benefits of seeing charts together instead of separately.
You got /4 concepts.