Chinaunix's Archiver
论坛
›
Python
› 利用python无法显示图片
yingzierhao
发表于 2016-04-29 17:03
利用python无法显示图片
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
img = mpimg.imread( '1.png' )
plt.imshow(img)代码如上所示,但是最后并没有显示图片,为啥?没有报错,并且图片是有的,这个是什么原因?
mswsg
发表于 2016-04-29 22:00
最后加上plt.show()
yingzierhao
发表于 2016-05-05 09:36
回复 2# mswsg
多谢,刚接触python,多谢指教!!
页:
[1]
查看完整版本:
利用python无法显示图片