Create images in memory. Print mode and size, then imshow.
Goal
Make a 120×80 green field.
from PIL import Image
im = Image.new('RGB', (120, 80), (0, 128, 64))
print(im.mode, im.size)
plt.imshow(im)
plt.axis('off')
plt.show()from PIL import Image
print(Image.new('L', (10, 10), 128).mode)