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

Samuel Gougeon sgougeon at free.fr
Sat Feb 23 13:24:25 CET 2013


Le 23/02/2013 13:18, Samuel Gougeon a écrit :
> Here is a simpler, working and likely more robust sample:
Strange bug when copying/pasting from Scinotes...
Here is the right sample (double checked ;):

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);


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


More information about the users mailing list