Gavin Wiggins


Imshow Plot with Matplotlib

Published on May 10, 2023
Tagged with python, matplotlib

Display data as an image using Matplotlib's imshow method.

import matplotlib.pyplot as plt
import numpy as np

a = np.random.rand(100, 100)

_, ax = plt.subplots(tight_layout=True)
ax.imshow(a, interpolation='bilinear')

plt.show()

imshow plot


Gavin Wiggins © 2026
Made on a Mac with Genja. Hosted on GitHub Pages.