<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">
      <div class="moz-cite-prefix">Hello,<br>
        <br>
        Without images, this post should pass the moderation ;)[to the
        moderator: did you decrease the max size of body recently? It
        was formerly possible to post with images and body> 100kB]<br>
        <br>
        Le 08/02/2016 11:47, <a class="moz-txt-link-abbreviated"
          href="mailto:antoine.monmayrant@laas.fr">antoine.monmayrant@laas.fr</a>
        a écrit :<br>
      </div>
      <blockquote cite="mid:56B87251.7040903@laas.fr" type="cite">Hi
        everyone, <br>
        <br>
        I just failed at placing an image behind a plot. <br>
        I thought that would be easy: <br>
            - create a figure <br>
            - create an image uicontrol <br>
            - create an axis <br>
            - plot in the axis <br>
            - set axis.filled="off" <br>
        <br>
        Apparently I was wrong. <br>
        I did not find a way to overlap a plot with transparent
        background over my image. <br>
        It seems that the image is always above the plot no matter what
        order the uicontrol/axes where created. <br>
        I also tried to put both of them inside the same frame, but I
        did not work either. <br>
      </blockquote>
      <br>
      You may use the z coordinate of your flat curves to manage
      overlays, as in:<br>
      <pre style="font-family:Monospaced;font-style:normal;font-size:14.0;"><span style="color:rgb(174,92,176);">clf</span>
<span style="color:rgb(0,0,0);">x</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);">linspace</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">20</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">200</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(174,92,176);">plot</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(50,185,185);">sin</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">x</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">e</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);">gce</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);">c</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">e</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(100,174,100);font-style:italic;">// Example with a local image. The image is from <a class="moz-txt-link-freetext" href="https://atoms.scilab.org/atoms.png">https://atoms.scilab.org/atoms.png</a></span>
<span style="color:rgb(50,185,185);">//xstring</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">$\scalebox{1}{\includegraphics{atoms.png}}$</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(100,174,100);font-style:italic;">// Example with a remote image under <a class="moz-txt-link-freetext" href="http://">http://</a> (http<b>s</b>: not accepted) </span>
<span style="color:rgb(100,174,100);font-style:italic;">xstring(0,-1,</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">$\scalebox{1}{\includegraphics{<a class="moz-txt-link-freetext" href="http://www.cnrs.fr/fr/z-tools/newune/themes/CNRSTheme/images/logocnrs.png">http://www.cnrs.fr/fr/z-tools/newune/themes/CNRSTheme/images/logocnrs.png</a>}}$</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">)</span>
<span style="color:rgb(0,0,0);">c</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">data</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(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(188,143,143);">0.1</span><span style="color:rgb(0,0,0);">;</span> <span style="color:rgb(100,174,100);font-style:italic;">  // <<<==== HERE</span>
<span style="color:rgb(0,0,0);">c</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">thickness</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(188,143,143);">2</span><span style="color:rgb(0,0,0);">;</span><span style="color:rgb(0,0,0);">

You may then tune the scalebox factor. Actually, like with an uicontrol(style="image"), the imported image is inlaid and is not resized accordingly with the embedding graphical figure.

HTH
Samuel Gougeon

</span></pre>
    </div>
  </body>
</html>