File: oldplot.sci

package info (click to toggle)
scilab 5.3.3-10
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 330,656 kB
file content (65 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution.  The terms
// are also available at    
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt

function []=oldplot(x,y,legx,legy,leg)
// 
// For backward compatibility with some very old stuff
//! 
  [lhs,rhs]=argn(0);

  if and(rhs<>[1:5]) then
    error(msprintf(gettext("%s: Wrong number of input argument(s): %d to %d expected.\n"), "oldplot", 1, 5));
  end

  if rhs >=2,
    if type(y)==1, 
      if prod(size(x))<>prod(size(y)),
	write(%io(2),'x and y must have the same size');
	return;end
    end;
  end;

  select rhs,
  case 1 then 
    [nl,nk]=size(x);
    if nl==1|nk==1 then
      plot2d1("enn",1,matrix(x,prod(size(x)),1));
    else
      clf();plot2d((ones(nl,1)*(1:nk))',x')
    end
  case 2 then clf();
    if type(y)==10,
      plot2d1("enn",1,matrix(x,prod(size(x)),1));
      xtitle(' ',y,' ');
    else
      plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
    end;
  case 3 then clf();
    if type(y)==10,
      plot2d1("enn",1,matrix(x,prod(size(x)),-1));
      xtitle(' ',y,legx);
    else 
      plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
      xtitle(' ',legx,' ');
    end;
  case 4 then clf();
    if type(y)==10,
      plot2d1("enn",1,matrix(x,prod(size(x)),1));
      xtitle(legy,y,legx);
    else 
      plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
      xtitle(' ',legx,legy);
    end;
  case 5 then clf();
    plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
    xtitle(leg,legx,legy);
  end
endfunction