display two png images simultaneously using pylab
问题 I want to open two png image files and display them side by side for visual comparison. I have this code for opening one png file (which I got from unutbu on stackoverflow.com): import numpy as np import pylab import matplotlib.cm as cm import Image fname='file.png' image=Image.open(fname).convert("L") arr=np.asarray(image) pylab.imshow(arr,cmap=cm.Greys_r) pylab.title('title') pylab.show() Is there a way to modify this code to open and display 2 png files side by side with their own titles?