<div dir="ltr"><div>Well, the base function behind "ShowImage" is "Matplot".</div><div><br></div><div>You can use a search engine of your choice to find ShowImage.sci.</div><div><br></div><div>"ShowColorImage" than is using "ShowImage" to create a colored Image.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Philipp</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-09 8:04 GMT+01:00 Antoine Monmayrant <span dir="ltr"><<a href="mailto:amonmayr@laas.fr" target="_blank">amonmayr@laas.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Le Mardi 9 Février 2016 00:04 CET, Philipp Mühlmann <<a href="mailto:p.muehlmann@gmail.com">p.muehlmann@gmail.com</a>> a écrit:<br>
<br>
> Well, as I understand you want to plot a function over an background image.<br>
><br>
> In the case the image pixel number fits the X-Y range of your graph it's<br>
> rather simple.<br>
<br>
Well, it is, unless IPD does not work on your system, which is my case!<br>
None, absolutely none of the image processing toolboxes work on my machine.<br>
And it's not only my machine, it's the case for most of the machines we have at work.<br>
So I cannot rely on an image processing toolbox to achieve what I want and I have to rely on base functions.<br>
<br>
Thanks anyway for you help,<br>
<br>
Antoine<br>
<br>
><br>
> img = ReadImage(IPD_PATH + 'demos\teaset.png');<br>
> rows = size(img,'r');cols = size(img,'c');<br>
> img(rows,1,:) = (0); // changing left lower image corner for<br>
> checking purpose<br>
> // change all 3 colour<br>
> channels to get a black pixel<br>
> ShowColorImage(img,'');<br>
> a = gca();a.axes_visible = ["on","on","off"];x = linspace(1,600,600);y<br>
> = 1/2*(x);plot(x,y,'-');a.data_bounds = [0,0;cols,rows];<br>
><br>
> Two tricky things though:<br>
><br>
> 1st: image coordinates (center of pixel) start at "1", hence there is a gap<br>
> of 0.5 between image borders and the axes<br>
><br>
> 2nd: it might become tricky if you want to have negative values on the axis.<br>
><br>
> Probably there is a way to shift the image to other position within the<br>
> coordinate system?<br>
><br>
><br>
> So....not sure if this helps your purpose.<br>
><br>
> You could also switch "ON" / "OFF" the background image by access the<br>
> children of the figure, such as:<br>
><br>
> IMGPlot = a.Children(2); // children(2) is the background in this<br>
> caseIMGPlot.visible = 'off';<br>
><br>
><br>
> A complete other way would be to combine two images of same size.<br>
> Say...background image is img1.<br>
><br>
> your plot = img2.<br>
> Plot the graph and save the figure as a temporary image.<br>
><br>
> load img1<br>
> load temporary image<br>
><br>
> If size (img1) == size(img2)....You could use SIVP module to linear combine<br>
> two images:<br>
><br>
> img_gray = double(RGB2Gray(img));img2 = zeros(rows, cols) +<br>
> 255;img2(rows/2,:) = 0;img3 = imlincomb( 0.5, img_gray, 0.4, img2)<br>
> // the values here define some kind of transparency.figure();<br>
> ShowImage(img3,'');<br>
><br>
><br>
><br>
> Best regards,<br>
> Philipp<br>
<span class="im HOEnZb">><br>
><br>
><br>
><br>
> 2016-02-08 17:49 GMT+01:00 Jan Åge Langeland <<a href="mailto:j-lan@online.no">j-lan@online.no</a>>:<br>
><br>
> ><br>
> ><br>
> > On 08.02.2016 11:47, <a href="mailto:antoine.monmayrant@laas.fr">antoine.monmayrant@laas.fr</a> wrote:<br>
> ><br>
> > 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<br>
> > image.<br>
> > It seems that the image is always above the plot no matter what order the<br>
> > uicontrol/axes where created.<br>
> > I also tried to put both of them inside the same frame, but I did not work<br>
> > either.<br>
> ><br>
> > Any idea?<br>
> ><br>
> ><br>
> ><br>
> > ShowImage(im,'J2');<br>
> ><br>
</span><span class="im HOEnZb">> > b=newaxes();<br>
> > b.filled = "off";<br>
> > plot(a)<br>
> ><br>
> > JÅ<br>
> ><br>
> > _______________________________________________<br>
> > users mailing list<br>
> > <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
> > <a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/mailman/listinfo/users</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > users mailing list<br>
> > <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
> > <a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/mailman/listinfo/users</a><br>
> ><br>
> ><br>
><br>
><br>
</span><span class="HOEnZb"><font color="#888888">> --<br>
> There we have the salad.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">There we have the salad.</div>
</div>