File: parseLegend.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (32 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function [mat,nbProcessed,typeOfLegend]=parseLegend(fun,parseList,start)

  mat=[];
  typeOfLegend=1;
  nbProcessed=0;
  i=start;
  while i<=length(parseList)
   if type(parseList(i))==10
        if size(parseList(i),2)>1
         mat=parseList(i);
         nbProcessed=size(mat,2);
        else
         mat=[mat;parseList(i)];
         nbProcessed=nbProcessed+1;
       end
       i=i+1;
   elseif type(parseList(i))==1
      if length(parseList(i))==1
         if  parseList(i)>=-1 & parseList(i)<=5
            typeOfLegend=parseList(i);
            i=i+1;
            nbProcessed=nbProcessed+1;
         else
             _error('legend : legend style must be a scalar between -1 and 5');
         end
       else
          _error('legend : legend style must be a scalar between -1 and 5');
       end
   end
  end

endfunction