Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the `plt.imshow()` function in Matplotlib?
Answer: `plt.imshow()` is used to display images in Matplotlib plots.

Example:

import matplotlib.image as mpimg
img = mpimg.imread('image.png')
plt.imshow(img)
plt.show()
Is it helpful? Yes No

Most helpful rated by users:

©2026 WithoutBook