matplotlib - Can you use wx.Timer() function to create dynamic graphs? -


i tried assigning plotting function wx.timer graph plotted every 1000 milliseconds. yet, graph not appearing @ at all.

class gpanel0(wx.panel):  def __init__(self, parent):     wx.panel.__init__(self, parent)     self.figure = figure()     self.axes = self.figure.add_subplot(111)     self.canvas = figurecanvas(self, -1, self.figure)     self.sizer = wx.boxsizer(wx.vertical)     self.sizer.add(self.canvas, 1, wx.left | wx.top | wx.grow)     self.setsizer(self.sizer)     self.timer = wx.timer(self)     self.bind(wx.evt_timer, self.draw, self.timer)     self.timer.start(1000)   def draw(self, event):     y, x=np.loadtxt('bv.txt',delimiter=',', unpack=true)     self.axes.plot(x, y)  def showyourself(self):     self.raise()     self.setposition((0,2))     self.fit()     self.show() 

yet graph not plot single set of variables @ all. seems if timer function not work plotting. pretty new please mind errors , mistakes in question.


Comments