On 09.02.2016 20:27, Samuel Gougeon wrote:

You may use the z coordinate of your flat curves to manage overlays, as in:
clf
x  =  linspace(0,20,200);
plot(x,sin(x))
e  =  gce();
c  =  e.children;
// Example with a local image. The image is from https://atoms.scilab.org/atoms.png
//xstring(0,-1,"$\scalebox{1}{\includegraphics{atoms.png}}$")
// Example with a remote image under http:// (http*s*: not accepted)
xstring(0,-1,"$\scalebox{1}{\includegraphics{http://www.cnrs.fr/fr/z-tools/newune/themes/CNRSTheme/images/logocnrs.png}}$";)
c.data(:,3)  =  0.1;  // <<<==== HERE
c.thickness = 2;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
Samuel

Thank you for sharing these very good methods. It opens a lot of new possibilities.

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:

clf
xstring(0,0,"$\scalebox{.3}{\includegraphics{http://photos.marinetraffic.com/ais/showphoto.aspx?photoid=445734}}$";); g=get("current_figure"); g.figure_size=[345,575]; b=newaxes(); b.filled = "off"; x = linspace(0,20,200);
plot(x,sin(x))

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.

Brgds
Jan Å


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to