[Scilab-users] Batch to export a graph to PNG automatically

CRETE Denis denis.crete at thalesgroup.com
Sun Oct 27 11:59:07 CET 2013


Hello,
I tried the code given in example for the function "driver", on a PC with Windows XP and Scilab 5.5.0: the report has a warning message given below.

-->current_driver = driver()
current_driver  =
 Rec

-->driver("Pos")
ans  =
 Rec

-->xinit(TMPDIR+"/foo.ps")
-->plot2d()
-->xend()
Warning !!!
Scilab has found a critical error (Unknown exception)
with "xend" function.
Save your data and restart Scilab.
       !--error 1
Affectation erronée.
Now, I issue the "driver" command twice:

-->current_driver = driver()
current_driver  =
 Rec

-->driver("Pos")
ans  =
 Rec

-->driver("Pos")
ans  =
 Pos

-->xinit(TMPDIR+"/foo.ps")
-->plot2d()
-->xend()

and I get the graph in ps format correctly in TMPDIR. Is this to be correlated to the behaviour that I observed (only with Scilab) when I try to switch between windows with Alt+Tab (I have to repeat the command twice) ? Should we consider this a bug ?
Best regards
Denis


De : users [mailto:users-bounces at lists.scilab.org] De la part de Sylvestre Ledru
Envoyé : samedi 26 octobre 2013 02:59
À : users at lists.scilab.org
Objet : Re: [Scilab-users] Batch to export a graph to PNG automatically

On 26/10/2013 01:45, Lecoeur, Nora wrote:
Hello,

What would be the program to write if I want to export a graph to PNG automatically with scilab ?


driver & xinit are probably what you are looking for:
http://help.scilab.org/docs/5.4.1/en_US/driver.html
http://help.scilab.org/docs/5.4.1/en_US/xinit.html


Sylvestre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20131027/020327ec/attachment.htm>


More information about the users mailing list