From: Lubos V. <li...@vr...> - 2008-07-13 09:26:01
|
hi, > 1. Would it be possible to do only shallow copy of the arrays that are > being plotted so that on redrawing the figure, chanes in the datasets > would be picked up automatically? If not, is Line2D.set_data(...) the > right approach? isn't this the way how the plotting is done? in my experience (iirc), the following thing works (x, y1, y2 are numpy arrays): pylab.ion() a, = pylab.plot(x,y1) b, = pylab.plot(x,y2) ... y1 += 10 y2 += 20 a.set_ydata(y1) b.set_ydata(y2) pylab.draw() y1 += 10 y2 += 20 a.set_ydata(y1) pylab.draw() in my experience BOTH plots get updated in this procedure, so i have to do first a deep copy in my case to get rid of these 'unwanted effects'... best, -- Lubos _@_" http://www.lubos.vrbka.net |