I seem to have run into this problem with wx years ago -- destroying the
widget that fed an event from a callback causes issues. As Chris
suggested, the following seems to work, however:
import matplotlib.pyplot as plt
import wx
def close_figure():
plt.close()
def onclick(event):
if
On 10/15/10 5:16 PM, Paul Ivanov wrote:
> I want to do something like this:
>
>import matplotlib.pyplot as plt
>def onclick(event):
>if event.button==1:
> plt.close()
>fig = plt.gcf()
>cid = fig.canvas.mpl_connect('button_press_event', onclick)
>plt.show()
>
> I've