[Matplotlib-users] How to determine whether a window is closed?

2012-08-07 Thread Qian Peng
Hi, In matplotlib, is there a way to check whether a window related to a figure has been closed by user? x=[1,2,3] fig = plt.figure() fig.show() plt.plot(x,x) plt.draw() later in the code, I want to make draw some other line, possibly on the same figure. I can switch to the preivious figure b

[Matplotlib-users] zoomed_inset_axes bbox_to_anchor not working

2012-08-07 Thread darkside
Hi everyone, I'm trying to make a zoom of a single plot. The problem is that the zoomed axes yticks overlap with the yaxes so I tried to use the bbox_to_anchor option in the zoom: axins = zoomed_inset_axes(ax, 3,bbox_to_anchor=(0.4,0.4),bbox_transform=ax.transAxes, loc=2) with different (x,y) par

Re: [Matplotlib-users] How to determine position of axes after imshow?

2012-08-07 Thread Mark Bakker
I tried a few things and found out that doing a pause works. So why does a pause work, but a draw() or show() does not? This all on Windows using the standard PythonXY installation. Here is the code that works (testimage.py): from pylab import * c = ones((10,20)) ax = imshow(c) pause(0.01) print a