<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 20/04/2021 à 14:53, Antoine
Monmayrant a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:e6006dde-b2f8-426b-370c-296b4065e210@laas.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hello Anna,</p>
<p>3 points:</p>
<p>(1) Could you post a minimum working example?<br>
Because your code below cannot run, many variables are missing.</p>
<p>(2) Usually, you'd better use xload/xsave to save & restore
graphics</p>
<p>(3) There seems to be a bug, as the following code:</p>
<blockquote>
<p><tt>h=scf()</tt><tt><br>
</tt><tt>plot()</tt><tt><br>
</tt><tt>h.children(1).x_ticks.labels="Anna"+h.children(1).x_ticks.labels;</tt><tt><br>
</tt><tt>sleep(100)</tt><tt> // just in case it's a race
condition<br>
</tt><tt>xsave(TMPDIR+"/tata.sod",h);</tt><tt><br>
</tt><tt>xdel(winsid())</tt><tt><br>
</tt><tt>xload(TMPDIR+"/tata.sod")</tt></p>
</blockquote>
<p>Does not restore the modified x_ticks properly...</p>
<p>Does anyone know whether this is a known bug?</p>
</blockquote>
<p>It is not yet reported. It is a regression brought by Scilab
6.0.0</p>
<p>There is a likely related strange feature:</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(50,185,185);">plot2d</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">ax</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">gca</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">ax</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">x_ticks</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">labels</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">Anna</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(92,92,92);">+</span><span style="color:rgb(0,0,0);">ax</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">x_ticks</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">labels</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(100,174,100);font-style:italic;">// See new labels</span>
<span style="color:rgb(0,0,0);">ax</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">auto_ticks</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(100,174,100);font-style:italic;">// automatically set to </span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">off</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;"> by manual setting</span>
<span style="color:rgb(0,0,0);">ax</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">auto_ticks</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(100,174,100);font-style:italic;">// See restored numeric labels</span>
<span style="color:rgb(100,174,100);font-style:italic;">// AND NOW:</span>
<span style="color:rgb(0,0,0);">ax</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">auto_ticks</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</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(0,0,0);">;</span>
<span style="color:rgb(100,174,100);font-style:italic;">// Former </span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">Anna</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">ed labels restored! So they were kept somewhere, despite the</span>
<span style="color:rgb(100,174,100);font-style:italic;">// ax.auto_ticks(1) = </span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">on</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">; restoration in the mean time...</span></pre>
<p>Samuel<br>
<br>
</p>
</body>
</html>