import matplotlib.pyplot as plt
import numpy as np
dpi = 80.0
xpixels, ypixels = 800, 800
fig = plt.figure(figsize=(ypixels / dpi, xpixels / dpi), dpi=dpi)
fig.figimage(np.random.random((xpixels, ypixels)))
plt.show()
Display image with a zoom = 1 with Matplotlib imshow() (how to?)