On Fri, Feb 29, 2008 at 8:27 AM,  <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
>  Quite recently I started out with learning Python, IPython, SciPy and
>  Matplotlib, to try see if I could replace some data analysis software
>  that was previously written in LabVIEW. Slowly I'm getting sort-of the
>  hang of it, but I've run into a few problems, and I'm now looking
>  around for some advice...
>
>  Main issue is Matplotlib's performance. I'm trying to plot a current
>  trace from a physics experiment, containing about 300,000 data points.
>  In LabVIEW, one can easily browse through a data set like this, but I
>  haven't been able yet to get such a good performance with
>  IPython+Matplotlib. Especially scrolling/panning through the data is
>  sluggish. (Anyone knows how to add a scrollbar for this instead of
>  panning with the mouse, btw?)
>

http://matplotlib.sf.net/examples/embedding_in_gtk3.py shows an
example using a scrolled window.

You could also use the "clipped line" approach to pass in a custom
class that only plots the data in the current view limits defined by
timemin, timemax.  See
http://matplotlib.sf.net/examples/clippedline.py.  This example
changes the marker and line style depending on how many points are in
the view port, but you could expand on this idea to do downsampling
when the number of points is too large.

BTW, I wrote the EEG viewer you referred to (it currently lives as
pbrain in the nipy project), and it was a bit pokey, but with some
judicious use of custom classes like the one in clippedline.py you can
probably get acceptable performance.  In earlier versions of mpl we
tried to build some of these smarts in (eg the data_clipped) but they
were rarely used and of questionable performance benefit so we pulled
them.  We may want to revisit the issue...

Hope this helps,
JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to