Visulization of xy plot

Dear all,

I want to plot a xy graph through solving and update it. for example the velocity in a point through time to see if it is converged or not (periodic). I tried using the following
real[int] xx(2), yy(2);
for (int i = 0; i < n; i++){
if (i>1)
{ xx.resize(i+1);
yy.resize(i+1);
}
solve Ns;
x1=3;
y1=-0.1;
xx[i] = i*dt;
yy[i] = u(x1,y1);
plot([xx, yy], wait=0);
}
however, no plot is shown during solving. how can I do that?
BR