[scilab-Users] plot in batch

Manuel JULIACHS manuel.juliachs at scilab.org
Wed Apr 7 10:47:32 CEST 2010


Anders Sneckenborg a écrit :
>
> Hi
>
>  
>
> I have a script which takes long time to run and when running it 
> creates several graphs. Every time a new graph is created the "cursor" 
> focus is transfered to the new window. 
> I use Scilab 5.2 under Windows XP. 
> I tried the -nwni and -nogui flags but it seems they can not be 
> used when creating graphs. 
> Is it possible to run the script in the background? 
>
> /Anders Sneckenborg 
>
>  
>
Hello,

when executing a drawing command which creates a new separate window,
the newly created window necessarily grabs the focus. I'm not aware of any
way to prevent this.

What you might do is to draw your graphs in the same window, using the 
subplot
command (which allows to put several graphs in separate subwindows), and 
postpone
drawing until your script's execution is over, with the 
drawlater/drawnow commands.

For example:

scf(0);
drawlater; // postpones drawing

// script execution for graph #1

subplot(2,2,1);
plot2d();    // first graph

// script execution for graph #2

subplot(2,2,2);
plot2d();    // 2nd graph

// etc.

drawnow; // executes the previous plot commands


This will grab the focus only once, when the scf(0) command is 
performed, and allow
your script to run without repeatedly grabbing the focus due to window 
creation.

-- 
-------------------------
Manuel Juliachs
Ingénieur de développement
-------------------------
Consortium Scilab
Digiteo
Domaine de Voluceau
Rocquencourt - B.P. 105 
78153 Le Chesnay Cedex France
Tél. : +33.1.39.63.52.71




More information about the users mailing list