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

A Two-Panel Figure

Context. Revenue and orders belong side by side — one figure, two panels, so the reader compares without scrolling.

Your task. Write make_grid(revenue, orders) that creates a 1×2 grid with plt.subplots(1, 2), plots revenue as a line in the left panel and orders as a line in the right panel, and returns both fig, axes.

Example. fig, axes = plt.subplots(1, 2) — then axes[0] is the left panel, axes[1] the right.

Notes. Return the pair: return fig, axes. One line per panel.

Previous
Style the Sales Line
Next
Line and Bars Side by Side