Sorry, Samuel. In fact, it does not work with a handle on an "axis", but it 
works with a handle on a "figure":

nc=40;
names_legend='legend_'+string(1:nc);
nc1=round(nc/2); //nc is the number of curves: split in 2
f1=gcf(); // Get handle on figure;
legends(names_legend(1:nc1),1:nc1,font_size=3,opt="ul");// put first column of 
legends
a1=gca(); // NOT USED ANYMORE
// Get the width of the text
tw=0; 
for i=1:nc, 
        
tl=xstringl(0,0,names_legend(i),f1.children(1).font_style,f1.children(1).font_size);
 
        tw=max(tw,tl(3));
end;
legends(names_legend((nc1+1):nc),(nc1+1):nc,font_size=3,opt="ul"); // 2nd 
column on top of first
move(f1.children(1).children(1),[tw*0.7514+0.05858,0]); //Move it horizontally 
(along x-axis);

I do not understand why it is not equivalent to refer to f1.children(1)  or to 
refer to a1 ...
Thank you for your help.
Denis

-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De 
la part de Samuel Gougeon
Envoyé : vendredi 22 février 2013 21:12
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Format legends of a graph as a 2D table

Hello Denis,

Running your example in a fresh scilab session, its last line yields:

-->move(a1.children(1),[tw*0.7513907+0.0585762,0]);
                                                 !--error 246 Fonction non 
définie pour le type d'argument donné.
   vérifiez les arguments ou définir la fonction %s_move pour la surcharge.


Regards
Samuel
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to