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 Overflow
🌐
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.
🌐
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()
🌐
Medium
medium.com β€Ί @ebimsv β€Ί mastering-matplotlib-part-5-working-with-images-3041fcdd88ff
Matplotlib: Part 5 β€” Working with Images | by Ebrahim Mousavi | Medium
November 10, 2024 - This section will guide you through key functionalities in Matplotlib for working with images, including displaying images, customizing colormaps, adding colorbars, and overlaying plots on top of images.
Find elsewhere
🌐
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.
🌐
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 ...
🌐
PyPI
pypi.org β€Ί project β€Ί matplotlib
matplotlib Β· PyPI
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
🌐
Simplified Science Publishing
simplifiedsciencepublishing.com β€Ί resources β€Ί best-color-palettes-for-scientific-figures-and-data-visualizations
Best Color Palettes for Scientific Figures and Data Visualizations
3 weeks ago - Your Graphing System - Use color formatting tools in your graphing software such as Excel, Prism, R, MATLAB, etc. These tools may not show the color codes, but most will allow you to use an eye dropper tool to select your desired colors from a color palette image.
🌐
Python.org
discuss.python.org β€Ί python help
Display multiple separate images preferably using matplotlib (without subplots, etc.) - Python Help - Discussions on Python.org
July 25, 2023 - Hi I have multiple images to to view and would like to display them with matplotlib (it’s what I have available), but view each within a separate figure, not subplots. This way I can work with one without affecting othe…