[Scilab-users] ?==?utf-8?q? Put an image as the background of an axis

Antoine Monmayrant antoine.monmayrant at laas.fr
Wed Feb 10 13:37:44 CET 2016


Le 02/10/2016 10:52 AM, Jan Åge Langeland a écrit :
>
>
> On 10.02.2016 09:19, Antoine Monmayrant wrote:
>> f = gcf();
>> imageWidth = 181;
>> imageHeight = 144;
>> f.axes_size=[imageWidth,imageHeight];
>>
>> //here image parent can be set to something else than the figure f 
>> (like a frame, ...)
>> h = uicontrol("Parent", f, ..
>> "Style", "image", ..
>> "Position", [0 0 imageWidth imageHeight], ..
>> "String", SCI + "/modules/demo_tools/images/logo_scilab.png");
> Thank you, that works fine, but I find that I have more control over 
> the image with:
>
> im2=SCI + "/modules/demo_tools/images/logo_scilab.png";
> xstring(0.4,0.4,"$\scalebox{.5}{\includegraphics{"+im2+"}}$");

Yes, you are right, it's more convenient.
The only added bonus with the uicontrol is that you have access to a 
callback function to react to the user's action.

Antoine

>
> Jan Å
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  BP 54200
  31031 TOULOUSE Cedex 4
  FRANCE

  Tel:+33 5 61 33 64 59
  
  email : antoine.monmayrant at laas.fr
  permanent email : antoine.monmayrant at polytechnique.org

+++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the users mailing list