<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Le 09/02/2012 10:36, anthony_daclin a écrit :
<blockquote cite="mid:1328780211108-3728918.post@n3.nabble.com"
type="cite">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.
<img moz-do-not-send="true"
src="http://mailinglists.scilab.org/file/n3728918/result_window.jpg"
border="0">This is the code I use:
<i>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>
I use the SIVP add-on for loading my picture and this code to insert it
inside my window:
<i>test="$\includegraphics{"+file_name+"}$" xstring(0,0,test)</i>
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 :<i>
xsetech([1/2+1/15,1/2+1/20,2/5,2/5])</i> )
</blockquote>
<br>
Try this example:<br>
<br>
<tt>x = linspace(0,10,100);<br>
plot(x,sin(x))<br>
txt =
"\includegraphics{<a class="moz-txt-link-freetext" href="http://www.scilab.org/var/ezwebin_site/storage/images/design/scilab-website/172-2-eng-GB/Scilab-WebSite.png">http://www.scilab.org/var/ezwebin_site/storage/images/design/scilab-website/172-2-eng-GB/Scilab-WebSite.png</a>}";
<br>
xstring(3,0.3,"$"+txt+"$")<br>
xstring(1,-0.5,"$\scalebox{0.5}{"+txt+"}$")<br>
</tt><br>
giving<br>
<img src="cid:part1.00040002.03070602@free.fr" alt=""><br>
<blockquote cite="mid:1328780211108-3728918.post@n3.nabble.com"
type="cite">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:
<i>!--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</i>
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 <br>
</blockquote>
Dragging the .scg file works for me, with Scilab 5.4.0-alpha1 on
Windows XP.<br>
load_graphichandle() was upgraded from 5.3.3 to 5.4.0-a1<br>
<br>
Regards<br>
Samuel<br>
<br>
PS: Please next time post a well-formatted message. Thank you<br>
<br>
</body>
</html>