1. Home
  2. Data Science
  3. Matplotlib
  4. What is the purpose of the plt.subplot() function in…

Added 24 Feb 2024

What is the purpose of the plt.subplot() function in Matplotlib?

  1. To create a subplot Correct answer
  2. To set the subplot title
  3. To display the plot
  4. To create a legend

Correct answer

A. To create a subplot

12 views

MCQSEXAM

Explanation

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.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Matplotlib MCQs

Practise all Matplotlib MCQs

Similar MCQs