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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -