What is the purpose of the plt.subplot() function in Matplotlib?
Correct answer
A. To create a subplot
12 views
A. To create a subplot
12 views
plt.subplot() creates a subplot — it adds one Axes to the current figure at a grid position. plt.subplot(2, 1, 1) means two rows, one column, first plot.
You call it once for each subplot you want.
Keep preparing with more Data Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.