matplotlib crashing on WxAgg backend

hello,

have an error occuring that causes my app to crash. I found a few other email listings similar to my problem, but there were no responses that I could learn from.

I am quickly plotting an array as it grows. I have a wxframe, canvas, figure and an axes. I clear the axes, plot the array, draw the canvas. this is happening at about 5 hz. I get the error message listed below and it only occurs when the mouse is hovering over the canvas or a button is pressed. I disabled these events from my canvas yet I still get this error, so I am not sure it is something from my code.

If I am not doing all this fast redrawing. there is no problem, ie. if the image is static I don’t have this error. I suspect it has something to do with the axes objects clearing and redrawing while a mouse or key event is simultaneously being drawn.

Please advise as to how I may fix this problem. thanks for your help.

Jeff

Traceback (most recent call last):
File “C:\Python26\lib\site-packages\matplotlib\backends\backend_wx.py”, line 1315, in _onMotion
FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt)
File “C:\Python26\lib\site-packages\matplotlib\backend_bases.py”, line 1244, in motion_notify_event
guiEvent=guiEvent)
File “C:\Python26\lib\site-packages\matplotlib\backend_bases.py”, line 899, in init
LocationEvent.init(self, name, canvas, x, y, guiEvent=guiEvent)
File “C:\Python26\lib\site-packages\matplotlib\backend_bases.py”, line 835, in init
self._update_enter_leave()
File “C:\Python26\lib\site-packages\matplotlib\backend_bases.py”, line 844, in _update_enter_leave
last.canvas.callbacks.process(‘axes_leave_event’, last)
File
“C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx_core.py”, line 14568, in getattr
raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the Canvas object has been deleted, attribute access no longer allowed.