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

Added 24 Feb 2024

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

  1. To display an image Correct answer
  2. To create a scatter plot
  3. To create a histogram plot
  4. To create a bar plot

Correct answer

A. To display an image

16 views

MCQSEXAM

Explanation

plt.imshow() displays an image, or any 2-D array as an image, with values mapped to colours through a colormap.

It is widely used for photographs, heatmaps and confusion matrices.

Practise more Data Science MCQs with answers and explanations 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