<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 09.02.2016 20:27, Samuel Gougeon
wrote:<br>
</div>
<blockquote cite="mid:56BA3D8D.4070207@free.fr" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix"><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 moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true" 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>
</blockquote>
<small>Samuel<br>
<br>
Thank you for sharing these very good methods. It opens a lot of
new possibilities.<br>
<br>
The way I want to use images in figure I find it better to modify
your script with newaxis() before plotting. This makes the picture
stay while zooming for instance:</small><br>
<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);"><span style="color:rgb(100,174,100);font-style:italic;">xstring(0,0,</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">$\scalebox{.3}{\includegraphics{<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.cnrs.fr/fr/z-tools/newune/themes/CNRSTheme/images/logocnrs.png">http://photos.marinetraffic.com/ais/showphoto.aspx?photoid=445734</a>}}$</span><span style="color:rgb(100,174,100);font-style:italic;">"</span><span style="color:rgb(100,174,100);font-style:italic;">);</span>
g=get("current_figure");
g.figure_size=[345,575];
b=newaxes();
b.filled = "off";
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);"></span><span style="color:rgb(0,0,0);"></span></pre>
<small>By the way it would have been interesting to see an example
with uicontrol(style="image") that you mention. I could never get
that right.<br>
<br>
Brgds<br>
Jan Å</small><br>
<br>
<br>
</body>
</html>