Numpy image display

Hey, everyone! I am trying to display the numpy image via matplotlib.pyplot, but the code had just completed successfully and the image had not been displayed. Here is the code:

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
im = Image.open(path to my image)
pic = np.asarray(im)
plt.imshow(pic)

I wonder if anyone helps…

this is not using opencv, so - off-topic

Add

plt.show()

at the end.


Full code - tested on Linux Mint 20

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image

im = Image.open('test/lenna.png')
pic = np.asarray(im)
plt.imshow(pic)
plt.show()

Image lenna.png from Wikipedia: lenna

agree : completely off topic
matplotlib tutorials are here

Thank you so much!!!