I believe `io.imshow` is provided via a plugin from Matplotlib. Matplotlib's `plt.show()` is a blocking function, which means that until that window is closed nothing else will be executed from the Python shell. So I don't think there's an elegant way to do what you ask, as the design decisions made around that package mean by definition any such `plt.close()` command would not work! It's possible someone has hacked this in, but if so I couldn't find it on short notice. Also, asking the Matplotlib guys about this might yield additional insight. Regards, Josh On Thursday, December 19, 2013 3:59:56 AM UTC-6, Alasdair McAndrew wrote:
This is a trivial question, but I still don't know how to do it. I've started up "ipython --pylab" and then:
import skimage.io as io
c = io.imread('cameraman.jpg')
io.imshow(c,'qt')
and this gives me an image in a window labelled "skimage". (I'm using Ubuntu 12.04). But how do I close this window from the console? I've tried:
plt.close('skimage')
plt.close()
plt.close('all')
plt.close(1)
none of which have any effect. I can of course close them with the mouse, but that seems a little inelegant. Is the method to "close" the window in another package entirely?
Thanks!