[SciPy-user] Fast simple plotting

Peter Wang pwang at enthought.com
Thu Jan 4 08:54:00 CST 2007


On Jan 4, 2007, at 4:10 AM, Lars Friedrich wrote:

> I am using python/scipy to control some hardware using ctypes and some
> self written dlls. Now I have the need to display some data online  
> while
> doing other things. Until now I used matplotlib to plot everything,  
> but
> this is too slow for the online display. What do you recommend?
>
> What I would like to do as a start is a small simple oscilloscope. I
> read data from a data acquisition card and plot it to a simple 2d- 
> plot.
> I would like to reach roughly 5 frames per second but *being able  
> to do
> something else at the same time*.

Hi Lars,

Someone else asked a similar question about a data acquisition  
application on the enthought-dev a couple of weeks ago and I wrote up  
an example program using Chaco for him.  Here is a link to his  
original email:
https://mail.enthought.com/pipermail/enthought-dev/2006-December/ 
003810.html

Here is the source code of the application (140 lines):
https://svn.enthought.com/enthought/browser/trunk/src/lib/enthought/ 
chaco2/examples/data_stream.py

And finally, a screenshot:
https://mail.enthought.com/pipermail/enthought-dev/attachments/ 
20061221/63fa296e/attachment-0001.png

Note that in this demo application, it's updating the screen 10 times  
per second, and it's plenty responsive.  (It can easily do 50.)


-Peter




More information about the SciPy-user mailing list