On Tue, Aug 18, 2009 at 12:53 PM, Alan G Isaac<alan.is...@gmail.com> wrote: > OK, I mostly understand John's example and have > adapted it in the attached Histogram class, for > whoever might care. (The file is a working > example.) Thanks! > > Here are my remaining questions. > > 1. To get a new histogram, I just change the > data in the vertices object and then ask my > FigureCanvasTkAgg to ``show`` itself. How > does this work? (I suppose that this FigureCanvas > has my figure, the figure references my axes, my axes > references my PathPatch, and my PathPatch references > the rectverts, and each looks to the next when I call > show?)
if you have already created the tk gui window and shown it, just call fig.canvas.draw() on each update of the vertices > 2. This is pretty fast. Would there be additional > speed gains to blitting, and if so, how would it > be done? (I'm just asking for clues, not a complete > example.) I expected to be able to set the animated > property on the patch when I called ax.add_patch, > but that does not work; am I supposed to just set > it directly? (I had supposed that the axes were > being informed e.g. when setting animated=True > for an ax.plot, but now I'm guessing that supposition > is wrong the `plot` just provides this as a convenience.) The animated property has to be on the patch itself, so when you create the path patch, you would do patch = patches.PatchPath(path, animated=True) ax.add_patch(patch) JDH ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users