What is the purpose of the plt.subplots() function in Matplotlib?
Correct answer
B. To create multiple subplots
16 views
B. To create multiple subplots
16 views
plt.subplots() creates a figure and a whole grid of subplots in one call, returning both: fig, axes = plt.subplots(2, 2).
It is the recommended starting point for the object-oriented interface. Compare plt.subplot(), which adds one subplot at a time.
Practise more Data Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.