<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks Samuel,<br>
      <br>
      Before I make the report, just to clarify one more point. <br>
      <br>
      The data extracted suppose to show white color plot, however: <br>
      <tt><br>
        <br>
        a = uint8(zeros(480,640,3));<br>
        a(:,:,1) = uint8(255);<br>
        a(:,:,2) = uint8(180);<br>
        a(:,:,3) = uint8(60);<br>
        Matplot(a);<br>
        <b>// View the image first before running following lines, this
          will show orange color</b><br>
        e = gce();<br>
        e.data = a;</tt><br>
      <b><tt><tt>// </tt></tt></b><tt><tt><tt><b>this will show 3
              columns of image, left -> white, middle -> gray,
              right -> black</b><br>
          </tt></tt>b = e.data;<br>
        and(b==255)</tt><br>
      <b><tt><tt><tt>// </tt></tt><tt><tt><tt>this will show white
                image</tt></tt></tt></tt></b><tt><br>
        Matplot(b);<br>
        <br>
        <br>
        Any extra comments to add into bug report? Thanks again.<br>
        <br>
        rgds,<br>
        CL<br>
        <br>
      </tt>On 11/3/2017 9:53 PM, Samuel Gougeon wrote:<br>
    </div>
    <blockquote cite="mid:13ec6b4b-4639-feac-b7f7-4dcd22150ef1@free.fr"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>