[scilab-Users] Creation of variable and graphical handles programmatically
Pierre LANDO
pierre.lando at scilab.org
Mon Oct 12 13:46:14 CEST 2009
Try something like that : execstr instead of eval
figure();
nstates=6;
ndim= ceil(sqrt(nstates));
multi=pmodulo((1:nstates)-1,ndim);
marg=0.05;
for (j=1:nstates)
execstr('g' + string(j) + '=newaxes()');
execstr('g' + string(j) + '.axes_bounds=[' + string(multi/ndim) +
',' +...
string(marg + multi*(1-marg)/ndim) + ',' +...
string(1/ndim) + ',' +...
string((1-marg)/ndim) + ']');
end
Sébastien Bihorel a écrit :
> Dear Scilab users,
>
> 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.
--
-------------------------
Pierre LANDO
Ingénieur de développement
-------------------------
Consortium Scilab
Digiteo
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex France
Tél. : +33.1.39.63.58.21
More information about the users
mailing list