python - Matplotlib imshow displays blank plot -


i figured should simple guess not.

from scipy import misc import matplotlib.pyplot plt  img = misc.imread("alyson.jpg") plt.imshow(img) plt.show() 

it draws blank canvas. inspecting array values loaded correctly. don't know issue be. i've tried loading matplotlib.image.imread , pil.image.open same effect.

i'm running lubuntu 13.04. here versions of various libraries:

pillow==2.5.2 matplotlib==1.3.1 numpy==1.8.2 scipy==0.14.0 

edit: solved! switched rendering backend using matplotlib.use("wx").

not cause of problem was, switched backend wxpython , images loaded misc.imread or matplotlib.image.imread worked fine.

import matplotlib matplotlib.use("wx") import matplotlib.pyplot plt ...etc 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -