plt.figure() vs plt.subplots() in Matplotlib: when to use each and what plt.subplots() returns
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how plt.figure() and plt.subplots() differ in Matplotlib, when to use each, and what plt.subplots() returns. Tests whether you know the Figure and Axes objects, how the shape of the returned axes depends on the grid, and when a hand-built layout is the better choice.