dynamic update in TkAgg ? (more)

I took out a wristwatch and timed it instead of guessing. I

    > get three frames per second. It's about 4x from where we
    > started, but still slow. I guess I'm just underpowered,
    > although a couple of years ago this was a powerhouse. It
    > seems that matplotlib may not be suited to this task. I
    > don't think it should take 2 GHz just to power a stripchart.

I agree. The current design of matplotlib doesn't really support this
kind of use because it redraws the entire figure every time and does
too much duplicate work at the python level. It shouldn't be too hard
to add some specialized functions for agg that support strip charts.
I've been planning to do it because we have a need for it here, and
there is some general on c.l.python for this kind of plotting feature
in python.

So I can start mulling over the design, can you tell me what kinds of
real time updates you need - only solid lines or arbitrary symbols
like 'o' too? Anything else besides line plots?

I'm envisioning some extension code that talks directly to the data
source and to the agg backend, updating only part of the canvas. The
blitting functions for GTK/WX/Tk Agg would have to be extended to blit
only a region of the canvas.

JDH

I agree. The current design of matplotlib doesn't really support this
kind of use because it redraws the entire figure every time and does
too much duplicate work at the python level. It shouldn't be too hard
to add some specialized functions for agg that support strip charts.
I've been planning to do it because we have a need for it here, and
there is some general on c.l.python for this kind of plotting feature
in python.

So I can start mulling over the design, can you tell me what kinds of
real time updates you need - only solid lines or arbitrary symbols
like 'o' too? Anything else besides line plots?

I'm envisioning some extension code that talks directly to the data
source and to the agg backend, updating only part of the canvas. The
blitting functions for GTK/WX/Tk Agg would have to be extended to blit
only a region of the canvas.

We'd also be interested in updates to real-time graph capabilities. We've just started examining Python + wxPython as a platform for control of some of our robotic systems. I've gotten a real-time bar graph running now, but it's awfully inefficient. I modified the basic dynamic_demo_wx.py file to update regularly, and at a forced 10 FPS it locks out the wxPython interface on my dual 2 GHZ Mac G5. No way it should do that ...

We'd also be interested in strip charts, mostly line based. We'd want to do multiple lines per chart. A capability to move through time, or zooming, might be useful, but certainly not necessary in a first rev (just mentioning it for now).

For bar graphs, we have to update at a given rate (typically up to about 25Hz), with different colors per bar (I have yet to do this part in the example I'm working on - think of multilpe temperatures being displayed, and different colors indicating different zones, per bar; nominal, caution, danger).

Having said all that, we're currently using wxPython, and I don't yet understand how AGG fits in the picture with matplotlib. :frowning:

TIA
Stephen