[Scilab-users] Put an image as the background of an axis
Samuel Gougeon
sgougeon at free.fr
Tue Feb 9 20:27:09 CET 2016
Hello,
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]
Le 08/02/2016 11:47, antoine.monmayrant at laas.fr a écrit :
> Hi everyone,
>
> I just failed at placing an image behind a plot.
> I thought that would be easy:
> - create a figure
> - create an image uicontrol
> - create an axis
> - plot in the axis
> - set axis.filled="off"
>
> Apparently I was wrong.
> I did not find a way to overlap a plot with transparent background
> over my image.
> It seems that the image is always above the plot no matter what order
> the uicontrol/axes where created.
> I also tried to put both of them inside the same frame, but I did not
> work either.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160209/f463e014/attachment.htm>
More information about the users
mailing list