If you are using matplotlib and want to show the image in your interactive notebook, try the following:
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()
Answer from Joe Bathelt on Stack OverflowMatplotlib
matplotlib.org βΊ stable βΊ tutorials βΊ images.html
Image tutorial β Matplotlib 3.11.2 documentation
Matplotlib relies on the Pillow library to load image data.
Matplotlib
matplotlib.org βΊ stable βΊ api βΊ image_api.html
matplotlib.image β Matplotlib 3.11.2 documentation
The image file. Matplotlib relies on Pillow for image reading, and thus supports a wide range of file formats, including PNG, JPG, TIFF and others.
14:15
Matplotlib Tutorial - Part 12: Show Images Using IMSHOW - YouTube
06:59
Matplotlib: Plotting Single & Multiple Images Made Easy! - YouTube
Image Processing 1: Read and Handle Images Using ...
10:06
How to Create Image with Python Matplotlib | Python Tutorial | ...
Matplotlib
matplotlib.org βΊ stable βΊ api βΊ _as_gen βΊ matplotlib.pyplot.imread.html
matplotlib.pyplot.imread β Matplotlib 3.11.2 documentation
The image file format assumed for reading the data. The image is loaded as a PNG file if format is set to "png", if fname is a path or opened file with a ".png" extension, or if it is a URL.
GeeksforGeeks
geeksforgeeks.org βΊ python βΊ plot-a-point-or-a-line-on-an-image-with-matplotlib
Plot a Point or a Line on an Image with Matplotlib - GeeksforGeeks
July 23, 2025 - from matplotlib import image from matplotlib import pyplot as plt # to read the image stored in the working directory data = image.imread('sunset-1404452-640x480.jpg') # to draw a line from (200,300) to (500,100) x = [200, 500] y = [300, 100] plt.plot(x, y, color="white", linewidth=3) plt.imshow(data) plt.show()
Top answer 1 of 11
387
If you are using matplotlib and want to show the image in your interactive notebook, try the following:
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()
2 of 11
58
In a much simpler way, you can do the same using
from PIL import Image
image = Image.open('image.jpg')
image.show()
Matplotlib
matplotlib.org βΊ stable βΊ api βΊ _as_gen βΊ matplotlib.pyplot.imshow.html
matplotlib.pyplot.imshow β Matplotlib 3.11.2 documentation
The input may either be actual RGB(A) data, or 2D scalar data, which will be rendered as a pseudocolor image.
GeeksforGeeks
geeksforgeeks.org βΊ python βΊ working-with-images-in-python-using-matplotlib
Working with Images in Python using Matplotlib - GeeksforGeeks
July 12, 2025 - The image module also includes two useful methods which are imread which is used to read images and imshow which is used to display the image. Below are some examples which illustrate various operations on images using matplotlib library: Example 1: In this example, the program reads an image using the matplotlib.image.imread() and displays that image using matplotlib.image.imread().
Analytics Vidhya
analyticsvidhya.com βΊ home βΊ plotting images using matplotlib library in python
Plotting Images Using Matplotlib Library in Python- Analytics Vidhya
February 20, 2025 - We learned how to use the βimageβ module of matplotlib to perform Various operations on the image including turning an image into a grayscale image, selecting a part of the image, displaying the color bar to the image, applying different color schemes to the image and saving the modified image.
Seaborn
seaborn.pydata.org
seaborn: statistical data visualization β seaborn 0.13.2 documentation
Seaborn is a Python data visualization library based on matplotlib.
TutorialsPoint
tutorialspoint.com βΊ matplotlib βΊ matplotlib_images.htm
Matplotlib - Images
In Matplotlib library displaying and manipulating images involves using the imshow() function. This function visualizes 2D arrays or images. This function is particularly useful for showing images in various formats such as arrays representing pixel
PlotDigitizer
plotdigitizer.com
PlotDigitizer β Extract Data from Graph Image Online
Upload the graph image to PlotDigitizer, select the graph type, calibrate the axis/axes, and start marking points and data values of the points that are automatically generated. You can also export these data to other formats.
NumPy
numpy.org
NumPy
How NumPy, together with libraries like SciPy and Matplotlib that depend on NumPy, enabled the Event Horizon Telescope to produce the first ever image of a black hole
Matplotlib
matplotlib.org βΊ stable βΊ api βΊ _as_gen βΊ matplotlib.pyplot.savefig.html
matplotlib.pyplot.savefig β Matplotlib 3.11.2 documentation
Save the current figure as an image or vector graphic to a file. ... savefig(fname, *, transparent=None, dpi='figure', format=None, metadata=None, bbox_inches=None, pad_inches=0.1, facecolor='auto', edgecolor='auto', backend=None, **kwargs ) The available output formats depend on the backend being used. ... A path, or a Python file-like object, or possibly some backend-dependent object such as matplotlib.backends.backend_pdf.PdfPages.
Automeris
automeris.io
automeris.io: Computer vision assisted data extraction from charts using WebPlotDigitizer
Web based software to extract data from plots, charts, bar charts etc.
Cgohlke
cgohlke.com
Christoph Gohlke
Read image and metadata from many bio-scientific formats such as TIFF, BigTIFF, OME-TIFF, GeoTIFF, Adobe DNG, ZIF (Zoomable Image File Format), MetaMorph STK, Zeiss LSM, ImageJ hyperstack, Micro-Manager MMStack and NDTiff, SGI, NIHImage, Olympus FluoView and SIS, ScanImage, Molecular Dynamics ...