Show one image in 5 line
1 | import matplotlib.pyplot as plt |
The output look like this:
Turn off the axis
The axis looks not good. So just turn it off by one line:1
2
3
4
5
6
7import matplotlib.pyplot as plt
import matplotlib.image as mpimg
path='/Users/typewind/Desktop/xpy/test.jpg'
img = mpimg.imread(path)
# Turn off the axis
plt.axis("off")
plt.imshow(img)