[Scilab-users] Running an .sce from the command line. message 9 of 20)

Tim Wescott Tim at Wescottdesign.com
Fri Apr 1 02:33:23 CEST 2016


    
plot2d (a, b, logflag = "ln")
Look at help for plot2d for details. 


Sent from my Verizon Wireless 4G LTE smartphone

-------- Original message --------
From: scilab.20.browseruk at xoxy.net 
Date: 03/31/2016  4:38 PM  (GMT-07:00) 
To: users at lists.scilab.org 
Subject: Re: [Scilab-users] Running an .sce from the command line. message 9
  of 20) 

Samuel,

Thanks. I had to do it in two steps:

    f = gcf();
    f.closerequestfcn="exit(0)";

otherwise I get:

    gcf().closerequestfcn="exit(0)";
         !--error 2
    Invalid factor.

The focus still returns to the command line console pushing the graphics window into the background and meaning I have to go looking for it to see the plot; but when I close it the console exits back to the OS.

Next problem, that should probably be a new thread: How to avoid the Singularity of log function from preventing the script completing if the data contains zeros?

I'm doing:

    plot( log10( a ), b );

To produce the log plot. 



> -----Original Message-----
> From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net
> Sent: Thu, 31 Mar 2016 21:09:20 +0200
> To: users at lists.scilab.org
> Subject: Re: [Scilab-users] Running an .sce from the command line.
> (scilab: message 9 of 20)
> 
> Hello,
> 
> Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a écrit :
>> Hi,
>> 
>> I can run my .sce file which produces a graph from a file of data from
>> the (windows) command line using:
>> 
>>      scilex -f myscript.sce filename.rdat
>> 
>> and that works except:
>> 
>> Once the plot() executes and the graphic window appears, control and
>> focus returns to the interactive command line.
> Scilab's console, i guess not the shell terminal.
> 
>> That's okay; but it'd would be really nice if the focus remained on the
>> graphic window until it was closed and then the scilab shell exited
>> automatically.
> Graphics are not modal: AFAIK it is not possible to lock the console
> with a figure until the figure is closed (or until any other event)(you
> could use a for loop waiting for an event ; but it won't reject CTRL-C
> interruptions).
> However, to close automatically Scilab when the figure is closed, you
> may add the following in your script:
> gcf().closerequestfcn="exit(0)";
> 
> HTH
> Samuel
> 
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/manager



_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160331/8df366e0/attachment.htm>


More information about the users mailing list