Re: [Matplotlib-users] animate histogram

2009-08-19 Thread John Hunter
On Wed, Aug 19, 2009 at 3:25 PM, Christophe Dupre wrote: > I just saw the email below from John, and I was wondering why using compound > paths are "goo-gobs" faster than using rectangles(patches)? > > I've been using the candlestick function quite a bit lately. I guess using > compound paths could

Re: [Matplotlib-users] animate histogram

2009-08-19 Thread Christophe Dupre
x27;ll give it a try. Regards, Christophe -Original Message- From: John Hunter [mailto:jdh2...@gmail.com] Sent: Sat 08/08/2009 09:00 To: Kaushik Ghose Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] animate histogram On Sat, Aug 8, 2009 at 6:17 AM, Kaushik G

Re: [Matplotlib-users] animate histogram

2009-08-18 Thread Jae-Joon Lee
On Tue, Aug 18, 2009 at 1:53 PM, Alan G Isaac wrote: > 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.) Blitting will improve the performance when significant portion of your plo

Re: [Matplotlib-users] animate histogram

2009-08-18 Thread John Hunter
On Tue, Aug 18, 2009 at 12:53 PM, Alan G Isaac 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 chan

Re: [Matplotlib-users] animate histogram

2009-08-18 Thread Alan G Isaac
Ooops, forgot the attachment. Alan """ Adapts John Hunter's example of how to use a path patch to draw a bunch of rectangles for an animated histogram """ import Tkinter as tk import numpy as np import matplotlib as mpl mpl.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasT

Re: [Matplotlib-users] animate histogram

2009-08-18 Thread Alan G Isaac
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 FigureCanvasTkAg

Re: [Matplotlib-users] animate histogram

2009-08-08 Thread Alan G Isaac
On 8/8/2009 10:09 AM John Hunter apparently wrote: > Here is the corrected example: Seems perfect! Time to study it. Thanks! Alan -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Sim

Re: [Matplotlib-users] animate histogram

2009-08-08 Thread John Hunter
On Sat, Aug 8, 2009 at 9:00 AM, John Hunter wrote: > """ > This example shows how to use a path patch to draw a bunch of > rectangles for an animated histogram > """ Oops, in my last post I have the timer logic wrong because the call is non-blocking so the animation ran too fast -- a rare occurre

Re: [Matplotlib-users] animate histogram

2009-08-08 Thread John Hunter
On Sat, Aug 8, 2009 at 6:17 AM, Kaushik Ghose wrote: > (http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Rectangle) > e.g. set_height() to change the rectangles? > > e.g. code > -- > import pylab > x = pylab.rand(20) > h = pylab.hist(x) > h[2][0]

Re: [Matplotlib-users] animate histogram

2009-08-08 Thread Kaushik Ghose
Hi Alan, Alan G Isaac wrote: > This is a second plea for help. > http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg12632.html > > I have a figure.Figure embedded in a FigureCanvasTkAgg. > Each iteration, new data are received, > and I want an updated histogram. > > Now I can

Re: [Matplotlib-users] animate histogram

2009-08-07 Thread Alan G Isaac
This is a second plea for help. http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg12632.html I have a figure.Figure embedded in a FigureCanvasTkAgg. Each iteration, new data are received, and I want an updated histogram. Now I can at least see a way to do this with pyplot: I j

[Matplotlib-users] animate histogram

2009-07-22 Thread Alan G Isaac
Animating a line plot is well covered in the Cookbook: http://www.scipy.org/Cookbook/Matplotlib/Animations Can anyone offer a hint or two for animating a histogram? Thanks, Alan Isaac -- _