[Scilab-users] Format legends of a graph as a 2D table

Samuel Gougeon sgougeon at free.fr
Sat Feb 23 13:18:53 CET 2013


Here is a simpler, working and likely more robust sample:

clf
nc  =  40;
names_legend  =  'legend_'+string(1:nc);
nc1  =  ceil(nc/2);   //nc is the number of curves: split in 2
legends(names_legend(1:nc1),1:nc1,font_size=3,opt="ul");// put first column of legends
// Get the width of this block:
idL1  =  gce();
tmp  =  idL1.children($).data(:,1);
width  =  max(tmp)-min(tmp);
// Display 2nd block
legends(names_legend((nc1+1):nc),(nc1+1):nc,font_size=3,opt="ul");  //  on top of first
move(gce(),[width,0]);  //Move it horizontally (along x-axis);


Regards
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130223/5a645df1/attachment.htm>


More information about the users mailing list