From: Mark <clu...@ya...> - 2006-04-17 10:59:51
|
Jonathan Brandmeyer wrote: > On Sun, 2006-04-16 at 21:14 +0100, Mark wrote: >> I am trying to create a realtime stripchart display by using the curve >> object. My problem is how to get the display "rolling". I would like to >> do this as efficient as possible (avoiding time consuming loops!). Any >> ideas ? > > Your best bet is probably going to involve using slicing. Maybe > something like this... > > # expensive inner loop gets done in C > graphline[:-1] = graphline[1:] > # new data point tacked on to the end > graphline[-1] = n_point > > HTH, > -Jonathan Thanks for the help. I could get the stripchart rolling by slicing "y", otherwise the position of the plotted points would not move: band.y[:-1] = band.y[1:] thank Mark ___________________________________________________________ 24 FIFA World Cup tickets to be won with Yahoo! Mail http://uk.mail.yahoo.com |