<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Le 11/03/2017 à 12:59, Tan Chin Luh a écrit :<br>
    </div>
    <blockquote
      cite="mid:270d1b10-1ec6-3263-e343-c617dd465415@tritytech.com"
      type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      .../...
      <p>2.  To solve this in Scilab 5.5.2, we usually assign the data
        directly into the Matplot children data. However, in Scilab 6,
        when we run:</p>
      <pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(0,0,0);">a</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">uint8</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(50,185,185);">zeros</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">480</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">640</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">3</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);">a</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</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(50,185,185);">uint8</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">255</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">a</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">uint8</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">180</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">a</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">3</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">uint8</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">60</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">Matplot</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">a</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(100,174,100);font-style:italic;">// View the image first before running following lines</span>
<span style="color:rgb(0,0,0);">h</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">gcf</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);">h</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">data</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">a</span><span style="color:rgb(0,0,0);">;</span></pre>
      <p>Even we assigned back the same variable, the orientation of the
        data is wrong and the image is wrongly plot on the figure. The
        above example will show orange color in the first plot, and
        after assigning the same data back into the Matplot children
        data, the 3 layers are arrange in wrong order resulting wrong
        display.</p>
    </blockquote>
    <br>
    This is clearly a regression. Only the first layer is actually
    assigned, others being ignored:<br>
    e = gce();<br>
    size(e.data)<br>
    and(e.data==255)<br>
    <br>
    <tt>--> e = gce();</tt><tt><br>
    </tt><tt><br>
    </tt><tt><tt>--> size(e.data)</tt><tt><br>
      </tt><tt> ans  =</tt><tt><br>
      </tt><tt>   480.   640.</tt><tt><br>
      </tt><tt><br>
      </tt>--> and(e.data==255)</tt><tt><br>
    </tt><tt> ans  =</tt><tt><br>
    </tt><tt>  T</tt><tt><br>
    </tt><tt><br>
    </tt>You may post a report about it.<br>
    <br>
    Best regards<br>
    Samuel<br>
    <br>
  </body>
</html>