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 โ€บ _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. For displaying a grayscale image, set up the colormapping using the parameters cmap='gray', vmin=0, vmax=255.
๐ŸŒ
Insightsoftwareconsortium
insightsoftwareconsortium.github.io โ€บ SimpleITK-Notebooks โ€บ Python_html โ€บ 10_matplotlib's_imshow.html
Using matplotlib to display inline images ...
We will also look at the subtleties of working with image filters that require the input images' to be overlapping. ... %matplotlib inline import matplotlib.pyplot as plt import SimpleITK as sitk # Download data to work on %run update_path_to_download_script from downloaddata import fetch_data as fdata ยท SimpleITK has a built in Show method which saves the image to disk and launches a user configurable program ( defaults to ImageJ ), to display the 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 ...
๐ŸŒ
Delft Stack
delftstack.com โ€บ home โ€บ howto โ€บ matplotlib โ€บ display an image with matplotlib python
How to Display an Image With Matplotlib Python | Delft Stack
March 11, 2025 - After loading the image, we use plt.imshow(image) to display it. The plt.axis('off') command removes the axis ticks and labels for a cleaner look. Finally, plt.show() renders the image window.
Find elsewhere
๐ŸŒ
YouTube
youtube.com โ€บ amir charkhi
Matplotlib Tutorial - Part 12: Show Images Using IMSHOW - YouTube
In this video, I will be showing you how to make your first imshow code, customize the visualization, and also how to make sure you prepare for a strong pres...
Published: September 6, 2022
Views: 11K
๐ŸŒ
Finxter
blog.finxter.com โ€บ home โ€บ learn python blog โ€บ how to display, modify and save images in matplotlib
How to Display, Modify and Save Images in Matplotlib - Be on the Right Side of Change
July 6, 2022 - If you want to import an image and to display it in a Matplotlib window, the Matplotlib function imread() works perfectly. After importing the image file as an array, it is possible to create a Matplotlib window and the axes in which we can ...
๐ŸŒ
Towards Data Science
towardsdatascience.com โ€บ home โ€บ latest โ€บ how to add an image to a matplotlib plot in python
How to Add an Image to a Matplotlib Plot in Python | Towards Data Science
January 28, 2025 - In this post, I described stepwise how an external image can be read as a NumPy array of binary format using Matplotlib, and how the image data can be displayed and added to a bar plot. In this context, I provided a simple example of adding a logo of a solar panel on top of the bar plot showing the global trend of installed capacity of solar PV.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ matplotlib-pyplot-imshow-in-python
matplotlib.pyplot.imshow() in Python - GeeksforGeeks
July 12, 2025 - This example shows how to overlay two images with different colormaps and transparency using imshow(). ... import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import LogNorm dx, dy = 0.015, 0.05 x = np.arange(-4.0, 4.0, dx) y = np.arange(-4.0, 4.0, dy) X, Y = np.meshgrid(x, y) extent = np.min(x), np.max(x), np.min(y), np.max(y) Z1 = np.add.outer(range(8), range(8)) % 2 plt.imshow(Z1, cmap ="binary_r", interpolation ='nearest', extent = extent, alpha = 1) def geeks(x, y): return (1 - x / 2 + x**5 + y**6) * np.exp(-(x**2 + y**2)) Z2 = geeks(X, Y) plt.imshow(Z2, cmap ="Greens", alpha = 0.7, interpolation ='bilinear', extent = extent) plt.title('matplotlib.pyplot.imshow() function Example', fontweight ="bold") plt.show()
๐ŸŒ
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 ...
๐ŸŒ
CodingNomads
codingnomads.com โ€บ explore-images-with-matplotlib-imshow
Explore Images with Matplotlib imshow
In this lesson you'll learn how to display one or several images in Python using the matplotlib `imshow` function and how to prep them for a ML model.
๐ŸŒ
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. We also learned how to plot the histogram of the image data. The media shown in this article is not owned by Analytics Vidhya and are used at the Authorโ€™s discretion.
๐ŸŒ
Medium
medium.com โ€บ data-science โ€บ how-to-add-an-image-to-a-matplotlib-plot-in-python-76098becaf53
How to Add an Image to a Matplotlib Plot in Python | by Himalaya Shrestha | TDS Archive | Medium
June 14, 2022 - In this post, I described stepwise how an external image can be read as a NumPy array of binary format using Matplotlib, and how the image data can be displayed and added to a bar plot. In this context, I provided a simple example of adding a logo of a solar panel on top of the bar plot showing the global trend of installed capacity of solar PV.
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ display-images-with-matplotlib-48789
Mastering Image Display with Matplotlib | LabEx
Display the images using the imshow function and different interpolation methods. for ax, interp_method in zip(axs.flat, methods): ax.imshow(grid, interpolation=interp_method, cmap='viridis') ax.set_title(str(interp_method)) Show the plot using ...
๐ŸŒ
YouTube
youtube.com โ€บ watch
Python: Matplotlib Image Display - YouTube
This video was produced by West Virginia View (http://www.wvview.org/) with support from AmericaView (https://americaview.org/). This material is based upon ...
Published: April 24, 2022
๐ŸŒ
PyImageSearch
pyimagesearch.com โ€บ home โ€บ blog โ€บ how to display a matplotlib rgb image
How to Display a Matplotlib RGB Image - PyImageSearch
April 17, 2021 - A simple call to the imread method loads our image as a multi-dimensional NumPy array (one for each Red, Green, and Blue component, respectively) and imshow displays our image to our screen.
๐ŸŒ
Matplotlib
matplotlib.org โ€บ stable โ€บ api โ€บ _as_gen โ€บ matplotlib.pyplot.show.html
matplotlib.pyplot.show โ€” Matplotlib 3.11.2 documentation
If you want an image file as well as a user interface window, use pyplot.savefig before pyplot.show. At the end of (a blocking) show() the figure is closed and thus unregistered from pyplot. Calling pyplot.savefig afterwards would save a new and thus empty figure. This limitation of command order does not apply if the show is non-blocking or if you keep a reference to the figure and use Figure.savefig. ... The jupyter backends (activated via %matplotlib inline, %matplotlib notebook, or %matplotlib widget), call show() at the end of every cell by default.