It's working great. Thank you very much !<br><br><div class="gmail_quote">On Mon, Oct 12, 2009 at 7:46 AM, Pierre LANDO <span dir="ltr"><<a href="mailto:pierre.lando@scilab.org">pierre.lando@scilab.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Try something like that : execstr instead of eval<div class="im"><br>
<br>
<br>
figure();<br>
<br>
nstates=6;<br>
ndim= ceil(sqrt(nstates));<br>
multi=pmodulo((1:nstates)-1,ndim);<br></div>
marg=0.05;<br>
<br>
for (j=1:nstates)<br>
execstr('g' + string(j) + '=newaxes()');<br>
execstr('g' + string(j) + '.axes_bounds=[' + string(multi/ndim) + ',' +...<div class="im"><br>
string(marg + multi*(1-marg)/ndim) + ',' +...<br></div>
string(1/ndim) + ',' +...<div class="im"><br>
string((1-marg)/ndim) + ']');<br>
end<br>
<br>
<br>
<br></div>
Sébastien Bihorel a écrit :<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Scilab users,<br>
<br>
I wonder how one can create variables or graphical handles programmatically and assign values to them at the same time. For instance, consider the following attempted code where nstates 'sub-plots' should be created within a figure (please, note that I don't want to use the subplot function for some other reason). This syntax is obviously wrong, according to the Scilab error message, but I do not know how to fix that. Any help would be greatly appreciated.<br>
</blockquote>
<br>
<br></div>
-- <br>
-------------------------<br><font color="#888888">
Pierre LANDO<br>
Ingénieur de développement<br>
-------------------------<br>
Consortium Scilab<br>
Digiteo<br>
Domaine de Voluceau<br>
Rocquencourt - B.P. 105 78153 Le Chesnay Cedex France<br>
Tél. : +33.1.39.63.58.21<br>
<br>
</font></blockquote></div><br>