I'm trying to visualize the evolution of two vectors.

My code look like as :

plstream pls(1);

pls.sdev("tk");

pls.scol0(0,255,255,255);

pls.init();

pls.scol0(1,0,0,0);

pls.ssub(1,2);

(...) definition of the vectors x, x2, y, y2

for(int j =0;j<100;j++){

(...) modification of y and y2

pls.adv(1);

pls.col0(1);

pls.env( 0., 1., 0., 1., 0, 0 );

pllab("(x)", "(y)", "y 1");

pls.line( 6, x, y );

pls.adv(2);

pls.col0(1);

pls.env( 0., 1., 0., 10., 0, 0 );

pllab("(x)", "(y)", "y 2");

pls.line( 6, x2, y2 );

usleep(SLEEP_GRAPHE);

}

I've two problems :

- I have to press ENTER to go to the next graph. What can I do to go automatically to the next graph ?

- I don't understand why the graph with x and y is in the bottom of the window and the graph with x2 and y2 in the top of the window. I was expecting the inverse.