python - imshow() function not working -


i'm working on program in python packages numpy,scipy , matplotlib.pyplot. code:

import matplotlib.pyplot plt scipy import misc im=misc.imread("photosafteraverage/exampleafteraverage1.jpg") plt.imshow(im, cmap=plt.cm.gray) 

for reason image isn't showing (checked if got image, in part it's fine- can print array.).

you need call plt.show() display image. or use ipython --pylab interactive shell matplotlib aware.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -