Real-time graphs
Doug Holton
insert at spam.here
Wed May 12 13:20:06 EDT 2004
snrkiwi-lists at yahoo.com wrote:
> I've trolled the lists, FAQs, and Net as a whole, but
> can't find anything definitive to answer this.
>
> We're looking for real-time graph capability (bar,
> line, etc), so that we can display telemetry from a
> robot system. There are a bunch of packages out
> there, but many seem to provide only static graphs
> (e.g. for scientific, financial data, etc). Does
> anyone currently display real-time telemetry using
> Python? Can anyone provide any suggestions?
Unfortunately there is not anything designed specifically for
real-time graphs in python. You could create a custom control.
My suggestion is to use a Timer (like wx.Timer in wxpython) set to a
particular "frame rate" - how many times the graph should be refreshed
per second. Everytime it fires it updates the graph (if it is a
scrolling plot, or else if the data has changed). Meanwhile in a
background thread your time-stamped data points are collected, perhaps
into two lists. If it is a scrolling plot you could discard (or log)
data that is old.
More information about the Python-list
mailing list