[SciPy-dev] xplt, drawing-time...
Travis E. Oliphant
oliphant.travis at ieee.org
Wed Mar 12 13:56:58 CST 2003
Johannes Broedel wrote:
> Hi, I just tried xplt, it works fine on both, teh Linux and the
> I want to show dynamic processes, e.g. computing 1000 data points to
> be shown not all at the same time - they should appear one after the
> other. At the moment xplt seems to collect the points and to draw them
> finally. Does anyone know a solution for that?
Perhaps what you want is simply the xplt.hold('on') function that will
hold the previous plot. Then you can plot data points one at a time in
a loop. You may have to issue calls to xplt.pause(<milliseconds>) to
delay the next plot.
I just checked in to CVS a fix for the current problem that xplt.plot
cannot handle plotting a single data point. (a quick fix is to get rid
of the squeeze function everywhere it shows up in xplt/Mplot.py).
Also, check out xplt.animate() if you think the result is blinking too
I just tried the following code and it gave me a nice animation:
x = r_[0:10:1000j]
for xval in x:
yval = sin(xval / 4)
xplt.plot(xval, yval, 'x')
If you don't like the changing limits on the plot as it runs, then just
xplt.limits(xlow,xhigh,ylow,yhigh) before the for loop.
> Thanks in advance, Johannes Broedel
> Scipy-dev mailing list
> Scipy-dev at scipy.net
More information about the Scipy-dev