|
From: Sandro T. <mat...@gm...> - 2009-06-22 19:33:47
|
Hi Jae-Joon On Mon, Jun 22, 2009 at 21:14, Jae-Joon Lee<lee...@gm...> wrote: > Without actual code, it is difficult to figure out what the real problem is. sorry I didn't attach a complete example but I would have to strip down a lot :) > Anyhow, did you check the below animation example? > > http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk.html yes, but I didn't have the illumination; until now :) > In the example, the grid is static (i.e., not animated). If what you that's perfect, I do not want it to be anymated. > want is to have the grid animated, then an explicit draw_artist call > is required (note that grid is drawn by axis). yeah, I want it to be only on Y (only horizonatal lines). The solution is: self.ax = self.fig.add_subplot(111) ... self.ax.grid(True) self.canvas.draw() # <-- this was missing self.bg = self.canvas.copy_from_bbox(self.ax.bbox) adding an explicit draw() call let the grid() be drawn and then the result is what's expected. Thanks a lot! Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |