<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">
<pre style="font-family:Monospaced;font-style:normal;font-size:14.0;"><span style="color:rgb(50,185,185);">figure</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">visible</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);"></span> allows to avoid using driver(), but the same memory consumption is then observable, when exporting the Sgrayploy with xs2png().
</pre>
By the way, at least on my system, the final figure.png file is
reddish.</div>
<div class="moz-cite-prefix">
<pre style="font-family:Monospaced;font-style:normal;font-size:14.0;"><span style="color:rgb(0,0,0);">nx</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">4000</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">ny</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">300</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">nc</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">100</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">x</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">nx</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">y</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">ny</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(92,92,92);">.'</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">z</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">y</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(0,0,0);">x</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">h</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">figure</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">visible</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">h</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">color_map</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);">hotcolormap</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">nc</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">Sgrayplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">x</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">y</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">z</span><span style="color:rgb(92,92,92);">.'</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">xs2png</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">h</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">C:/windows/temp/figure.png</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span></pre>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 03/12/2020 à 09:48, Antoine
Monmayrant a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:cee70853-2f4e-b1be-92c8-fd3708d4747b@laas.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hello all,</p>
In these days of remote working, I need to use again scilab in
headless mode to generate graphics.<br>
<p>In other words, I connect in command line only to a remote
server where scilab is installed and I want it to generate
graphics using a combination of driver, xinit and xend.</p>
There seems to be some issues with driver/xinit/xend: huge memory
overhead and long computation time that makes it impossible to
generate some plots in headless mode.<br>
<p>For example, a simple Sgrayplot that takes ~1 second to plot
and save to a png in normal mode takes more than 200 seconds and
huge amount of ram in headless mode (see attached test script).<br>
<br>
I also have some plots that works without a problem in normal
mode, but fail in headless mode because of some memory
limitation:</p>
<blockquote>
<p>xend: An error occurred: Unable to create export file, not
enough memory. Decreasing the number of elements or the size
of the figure should fix this error.<br>
</p>
</blockquote>
<p>Is there a way to get around these problems?</p>
<p>Thanks for your help,<br>
</p>
<p>Antoine</p>
<br>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>