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
Post a Comment