<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 Denis,<br>
      <br>
      I am not able to reproduce the behavior that you describe, neither
      with 6.0.0 nor with 6.0.1 on Windows7 64 bits:<br>
      <br>
      g_test=scf();<br>
      x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);<br>
      plot2d(x',[y;z]',style=1:2)<br>
      legends(['Sin','Cos'],1:2,"ur")   // with an _s_, as in your post<br>
      twinkle(gcf().children(1))<br>
      save("fig0.dat","g_test")<br>
      <br>
      xdel(gcf().figure_id)<br>
      load fig0.dat<br>
      twinkle(gcf().children(1))<br>
      <br>
      The legend is correctly restored, at the expected position, with
      the expected filled property set to "on", with its handle at the
      expected first position among figure's children.<br>
      <br>
      I did not try yet on Linux.<br>
      <br>
      Regards<br>
      Samuel<br>
      <br>
      Le 05/06/2018 à 12:15, CRETE Denis a écrit :<br>
    </div>
    <blockquote
      cite="mid:20d02dcbd0854fb9bb2e0a82ccb268f3@thalesgroup.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">Hello,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">I noticed that saving graphs with legends was
            not reliable. Loading the graph in exactly the same
            environment results in a figure without readable legend.
            More specifically, the legend is almost always stowed in the
            upper left corner of the window, with all its components
            stacked on top of each other.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">In addition, even if the legend is initially in
            the top axis level “Axis(1)”, after loading it appears in
            the tree in “Axis(2)”, i.e. behind the graph. So that moving
            back the legend to its original (X,Y) position does not
            allow to see it until gcf().children(1).filled=”off” is
            issued.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"> <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">Moving the legend using the “Axis properties”
            window is somehow possible by changing the “Data bounds”
            fields of the “Axis Options”, but it is hard to tell what is
            the effect of the variable in each field. In addition, the
            units are not linked to anything relevant (always 0 for the
            first field and 0.001 for the second field ? same for X and
            Y). It looks like in general only the difference between the
            second field and the first field matters.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">g_test=scf();<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="ES">x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="ES">plot2d(x',[y;z]',style=1:2)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">legends(['Sin','Cos'],1:2,"ur")<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">// Now, I save the figure in a file,
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">// clear it,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">// and load it again, to notice that the legend
            escaped from its original place, not being able to read it.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">// Legend recovery:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">g_test.children(1).filled="off";<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">// and then it may be necessary to play with
            the “Data Bounds” of Axis(2), X or Y (or both).<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">I am using SciLab 6.0.0 (64 bits) on Windows 7
            and a more recent version on Linux (64 bits), and both show
            this behavior. With SciLab 5.5.0 on Windows 7, after loading
            the figure, the legend slips away as well, but it is still
            in Axis(1); thus, g_test.children(1).filled="off" is not
            necessary. And moving back the legend to its original
            position is achieved by setting the Data Bounds to 0 and
            0.001 on both X and Y axes.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">This behaviour looks so strange to me that I
            have spent a lot of time trying to figure out how to avoid
            it… without success.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">Best regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US">Denis
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-family:"Arial","sans-serif";mso-fareast-language:FR">[@@
            THALES GROUP INTERNAL @@]<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-family:"Arial","sans-serif";mso-fareast-language:FR"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif"">Unité
            Mixte de Physique CNRS / THALES<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif"">1
            Avenue Augustin Fresnel<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif"">91767
            Palaiseau CEDEx - France<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif"">Tel
            : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif"">e-mail
            : <o:p>
            </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""> <a
              moz-do-not-send="true"
              href="mailto:denis.crete@thalesgroup.com"><span
                style="color:blue">denis.crete@thalesgroup.com</span></a>
            <<a moz-do-not-send="true"
              href="mailto:%20denis.crete@thalesgroup.com"><span
                style="color:blue">mailto:%20denis.crete@thalesgroup.com</span></a>><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""><a
              moz-do-not-send="true"
              href="http://www.trt.thalesgroup.com/ump-cnrs-thales"><span
                style="color:blue">http://www.trt.thalesgroup.com/ump-cnrs-thales</span></a><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Arial","sans-serif""><a
              moz-do-not-send="true"
              href="http://www.research.thalesgroup.com"><span
                style="color:blue">http://www.research.thalesgroup.com</span></a><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <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>