File: parseAxisLocation.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 (36 lines) | stat: -rw-r--r-- 1,042 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
33
34
35
36
function out=parseAxisLocation(typeOfPlot,value,pptystring,ppty)

//
// Parsing function for the 'axisLocation' property 
//

select ppty
case "YAxisLocation"
  if type(value)==10
     if and(value~=["left";"middle";"right"])
        _error(sprintf('%s : YAxisLocation must be equal to ""left"",""middle"" or ""right""',typeOfPlot))
    end
  else
    _error(sprintf('%s : missing YAxisLocation value',typeOfPlot));  
  end
case "XAxisLocation"
  if type(value)==10
     if and(value~=["top";"middle";"bottom";"bot"])
        _error(sprintf('%s : XAxisLocation must be equal to ""top"",""middle"" or ""bottom""',typeOfPlot))
    end
  else
    _error(sprintf('%s : missing XAxisLocation value',typeOfPlot));  
  end
case "ZAxisLocation"
  if type(value)==10
     if and(value~=["left";"middle";"right"])
        _error(sprintf('%s : ZAxisLocation must be equal to ""left"",""middle"" or ""right""',typeOfPlot))
    end
  else
    _error(sprintf('%s : missing ZAxisLocation value',typeOfPlot));  
  end
end

out=list(ppty,value);

endfunction