[scilab-Users] Updating handles w/o a loop

Mathieu Dubois mathieu.dubois at limsi.fr
Sun Feb 19 11:32:23 CET 2012


Hello,

Le 17/02/2012 16:03, jmknapp a écrit :
> I'm updating an array of graphic entity handles like so (updating XY
> positions of a bunch of plotted points):
>
> for j = 1:N
>         handle(j).children.data = [ x(j) y(j) ] ;
>
> Is there a way to do that in one statement without having to resort to a
> loop?
>
I'm not sure that there is a way to do that but I guess you ask the 
question because you are experiencing a lot of screen refresh which is 
long because scilab redraws everything at each step (I had similar 
problems).

In that case you can try to use drawlater() and drawnow(). For instance:
drawlater();
for j = 1:N
   handle(j).children.data = [ x(j) y(j) ] ;
drawnow();
should be really faster (and save your eyes :)

Probably a stupid question but... If you know the coordinates [x(j), 
y(j)] why don't you plot them directly?

Mathieu

> Joe
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Updating-handles-w-o-a-loop-tp3753928p3753928.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
>
> --
> To unsubscribe from this mailing-list, please send an empty mail to
> users-unsubscribe at lists.scilab.org
> To check the archives of this mailing list, see
> http://mailinglists.scilab.org/
>



More information about the users mailing list