1## Copyright (C) 1998-2003 Joao Cardoso.
2##
3## This program is free software; you can redistribute it and/or modify it
4## under the terms of the GNU General Public License as published by the
5## Free Software Foundation; either version 2 of the License, or (at your
6## option) any later version.
7##
8## This program is distributed in the hope that it will be useful, but
9## WITHOUT ANY WARRANTY; without even the implied warranty of
10## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11## General Public License for more details.
12##
13## This file is part of plplot_octave.
14
15function p2
16
17  global pl_automatic_replot;
18  t = pl_automatic_replot;
19  pl_automatic_replot = 0;
20
21  legend("opaque",0)
22  title("PLplot Example 2");
23
24  x=-pi/2:0.1:2*pi;
25  y1=sinc(x);
26  y2=sin(x).*cos(2*x);
27  y3=x.*sin(x);
28  plot(x, y1, ';sinc(x);',
29       x, y2, 'b;sin(x)*cos(2*x);',
30       x, y3, 'g;x*sin(x);');
31
32  pl_automatic_replot = t;
33
34endfunction
35
36