[scilab-Users] Adding picture inside a graphic window
Samuel Gougeon
sgougeon at free.fr
Fri Feb 10 02:14:35 CET 2012
Le 09/02/2012 10:36, anthony_daclin a écrit :
> Hello, I am a new user of Scilab, I have made a function for beeing
> able inside the same graphic window to show plotted results and
> picture too explaining the position of my result. You can see the
> result of my work. This is the code I use: /function afficher()
> file_name=uigetfile(["*.jpg"]) xsetech([1/2+1/15,1/2+1/20,2/5,2/5])
> test="$\includegraphics{"+file_name+"}$" xstring(0,0,test)
> endfunction/ I use the SIVP add-on for loading my picture and this
> code to insert it inside my window:
> /test="$\includegraphics{"+file_name+"}$" xstring(0,0,test)/ I have
> two problems: The first one, is that using this code do not allow me
> to resize my picture to the space available inside my window ( the
> size :/ xsetech([1/2+1/15,1/2+1/20,2/5,2/5])/ )
Try this example:
x = linspace(0,10,100);
plot(x,sin(x))
txt =
"\includegraphics{http://www.scilab.org/var/ezwebin_site/storage/images/design/scilab-website/172-2-eng-GB/Scilab-WebSite.png}";
xstring(3,0.3,"$"+txt+"$")
xstring(1,-0.5,"$\scalebox{0.5}{"+txt+"}$")
giving
> The second one is: I want to save my window and being able to directly
> open a saved window by puting it inside Scilab. In ths, case a error
> message appears: /!--error 144 Opération non définie pour les
> opérandes données. vérifier ou définir la fonction %axesData_n_s pour
> la surcharge. at line 5 of function load_user_data called by : at line
> 423 of function load_graphichandle called by : at line 104 of function
> load_graphichandle called by : at line 18 of function %h_load called
> by :
> load('\\033makhffile001.velux.org\033MA-WIN7-root$\ada.kh-f\Desktop\test.scg');
> while executing a callback/ Do anyone know how to solve my problem or
> know a way to put a picture inside a window and being able to save the
> window and open it without any crash. Thank you for the interest given
> to my problem. Regards. Anthony
Dragging the .scg file works for me, with Scilab 5.4.0-alpha1 on Windows XP.
load_graphichandle() was upgraded from 5.3.3 to 5.4.0-a1
Regards
Samuel
PS: Please next time post a well-formatted message. Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120210/9e3d9dfd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot.png
Type: image/png
Size: 18817 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20120210/9e3d9dfd/attachment.png>
More information about the users
mailing list