[Scilab-users] ?==?utf-8?q? ?==?utf-8?q? stripchart?

sgougeon at free.fr sgougeon at free.fr
Wed Apr 26 17:52:17 CEST 2017


----- Mail original -----
Objet: Re: [Scilab-users]	?==?utf-8?q? ?==?utf-8?q? stripchart?

>//dummy loop to simulate data generation and plotting
>for i=1:1000
>    oldxy=e.children.data;//old data
>    
>    newy=rand();//this would be your recently measured Y
>    newx=oldxy($,1)+1;//this would be your recently measured X
>    newxy=[oldxy(2:$,:);[newx,newy]];
>    e.children.data=newxy;//update data

You can replace all the following

>    xmin=min(newxy(:,1));
>    xmax=max(newxy(:,1));
>    ymin=min(newxy(:,2));
>    ymax=max(newxy(:,2));
>    e.parent.data_bounds= [xmin,ymin; xmax,ymax];//rescale plot

with only

     replot // or: replot tight

>    sleep(50)//wait a bit for a slow scroll
>end

and that's it

Samuel



More information about the users mailing list