From: <and...@ti...> - 2005-03-07 16:55:08
|
Hello Matt & NG, >I get this (fast resizes will eventually crash python though not >immediately) as well with keypress_demo.py, but not with >embedding_in_wx.py or in my own class-based uses of WXAgg: they >resize fine (and quickly) without crashing. It doesn't seem to >be leaking memory, but it seems like it may be something >specific to pylab. I'm not very familiar with pylab, so I'm not >sure of the details. > I am not familiar with pylab too, so I don't know what may be the problem= . >I believe this behavior is common to other backends (the >toggling occurs for me with the TkAgg backend too). I'd guess >that this example hasn't been updated to work with the newer >approaches to pylab being "interactive". Again, I'm not sure of >the right fix, as I'm not familiar enough with the approach that >starts with "from matplotlib.pylab import *" > >The keypress and resizing events work for me with WXAgg on >WinXP. Is it possible to meet your needs by following the >embedding_in_wx.py examples instead of relying on pylab? > I am following the embedding_in_wx.py example. If effect, I never use the= syntaxes: from pylab import import pylab and so on. I just "copied" the embedding_in_wx.py module and I have adapt= ed it for my purposes. This is my import section: from matplotlib import use as matuse matuse('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Figure= Canvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure Pylab is not there... am I missing something else? Thank you very much for your help. Andrea. |