FAQ
Hi,

I am programming a oscilloscope module in Python. For this reason, I
want to plot very many data points as fast as possible. This can be
more than 100 000 at once. So far I have been using the ploting module
of wxPython. However, it becomes unstable for more than 25000 points.
Can someone recommend me a faster plotting library? It would be really
cool if one could embed this in wxPython. If someone has an idea I
would be very glad about answer.

With kind regards,

Daniel

Search Discussions

  • Stef Mientki at Jul 9, 2009 at 10:26 pm

    tt-industries wrote:
    Hi,

    I am programming a oscilloscope module in Python. For this reason, I
    want to plot very many data points as fast as possible. This can be
    more than 100 000 at once.
    At once is impossible ;-)
    So far I have been using the ploting module
    of wxPython.
    which plotting module ?
    However, it becomes unstable for more than 25000 points.
    again what do you mean: 25000 points per ?
    25000 points on a 1600 pixel width screen ?

    Please try to be somewhat more specific.
    cheers,
    Stef
    Can someone recommend me a faster plotting library? It would be really
    cool if one could embed this in wxPython. If someone has an idea I
    would be very glad about answer.

    With kind regards,

    Daniel
  • Chris Rebert at Jul 9, 2009 at 11:54 pm

    On Thu, Jul 9, 2009 at 3:03 PM, tt-industrieswrote:
    Hi,

    I am programming a oscilloscope module in Python. For this reason, I
    want to plot very many data points as fast as possible. This can be
    more than 100 000 at once. So far I have been using the ploting module
    of wxPython. However, it becomes unstable for more than 25000 points.
    Can someone recommend me a faster plotting library? It would be really
    cool if one could embed this in wxPython. If someone has an idea I
    would be very glad about answer.
    Don't know how fast it is or how well it integrates, but matplotlib is
    probably worth considering:
    http://matplotlib.sourceforge.net/

    Cheers,
    Chris
  • Ben Finney at Jul 10, 2009 at 1:11 am

    tt-industries <mail.to.daniel.platz at googlemail.com> writes:

    I am programming a oscilloscope module in Python. For this reason, I
    want to plot very many data points as fast as possible. This can be
    more than 100 000 at once.
    I think you will find good results using Numpy for your arrays of data
    <URL:http://numpy.scipy.org/> and Matplotlib to plot those arrays
    <URL:http://matplotlib.sourceforge.net/>.

    --
    \ ?Ubi dubium, ibi libertas.? (?Where there is doubt, there is |
    `\ freedom.?) |
    _o__) |
    Ben Finney
  • Roy Smith at Jul 10, 2009 at 1:16 am
    In article
    <0734dc45-d8a0-4f28-b945-f9e179f30f5c at h11g2000yqb.googlegroups.com>,
    tt-industries wrote:
    I am programming a oscilloscope module in Python.
    Sigh. I guess I'm showing my age, but I still can't get used to the idea
    that the right tool to build an oscilloscope is no longer a soldering iron.
  • Lazy1 at Jul 10, 2009 at 3:14 am
    Hello Daniel,
    Can someone recommend me a faster plotting library?
    I found out gnuplot to be blazing fast for many many points.
    I usually just call it using subprocess but there are Python bindings
    to it somewhere as well.

    HTH,
    --
    Miki <miki.tebeka at gmail.com>
    http://pythonwise.blogspot.com



    From http Fri Jul 10 05:24:54 2009
    From: http (Paul Rubin)
    Date: 09 Jul 2009 20:24:54 -0700
    Subject: How to check if any item from a list of strings is in a big
    string?
    References: <bf87ea0b-e875-4cb7-b221-62057b7b2767@s31g2000yqs.googlegroups.com>
    Message-ID: <7x63e1kynt.fsf@ruckus.brouhaha.com>

    inkhorn <matt.dubins at sympatico.ca> writes:
    def list_items_in_string(list_items, string):
    for item in list_items:
    if item in string:
    return True
    return False
    You could write that as (untested):

    def list_items_in_string(list_items, string):
    return any(item in string for item in list_items)

    but there are faster algorithms you could use if the list is large and
    you want to do the test on lots of long strings, etc.
  • Jeremy Sanders at Jul 10, 2009 at 8:51 am

    tt-industries wrote:

    Hi,

    I am programming a oscilloscope module in Python. For this reason, I
    want to plot very many data points as fast as possible. This can be
    more than 100 000 at once. So far I have been using the ploting module
    of wxPython. However, it becomes unstable for more than 25000 points.
    Can someone recommend me a faster plotting library? It would be really
    cool if one could embed this in wxPython. If someone has an idea I
    would be very glad about answer.
    Veusz can plot a line with that many points with that many points in a
    couple of seconds on my system. It's a bit faster without antialiasing,
    slower if you want to actually plot markers at each position.

    Jeremy
  • Daniel Platz at Jul 11, 2009 at 10:33 pm
    Hi,

    thanks for your repleys. I have tried matplotlib but it is extremely
    slow. I think it is more optimized for good looking plots instead of
    speed. I do not know the Python bindings of gnuplot and Veusz. To
    clarify the issue again, by 25000 data points I mean 25000 pixels,
    i.e. corresponding (x,y) pairs. Thus the mapping to one pixel on the
    screen is not unique.

    Now, that I have to implement this problem on my own I am very
    impressed by the plotting capabilities of LabView which brings thounds
    of data points on screen in an extremely short time.

    Thanks for your help.

    Best regards,

    Daniel
  • Ben Finney at Jul 11, 2009 at 11:27 pm

    Daniel Platz <mail.to.daniel.platz at googlemail.com> writes:

    I do not know the Python bindings of gnuplot and Veusz.
    A web search does, though.

    <URL:http://clusty.com/search?query=gnuplot+python>
    <URL:http://clusty.com/search?query=veusz+python>

    --
    \ ?The problem with television is that the people must sit and |
    `\ keep their eyes glued on a screen: the average American family |
    _o__) hasn't time for it.? ?_The New York Times_, 1939 |
    Ben Finney
  • Mmanns at Jul 15, 2009 at 10:36 pm

    On Sat, 11 Jul 2009 15:33:32 -0700 (PDT) Daniel Platz wrote:

    thanks for your repleys. I have tried matplotlib but it is extremely
    slow. I think it is more optimized for good looking plots instead of
    speed. I do not know the Python bindings of gnuplot and Veusz. To
    clarify the issue again, by 25000 data points I mean 25000 pixels,
    i.e. corresponding (x,y) pairs. Thus the mapping to one pixel on the
    screen is not unique.
    Have you already tried out rpy?

    Martin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 9, '09 at 10:03p
activeJul 15, '09 at 10:36p
posts10
users8
websitepython.org

People

Translate

site design / logo © 2022 Grokbase