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 p3
16
17  global pl_automatic_replot;
18  t = pl_automatic_replot;
19  pl_automatic_replot = 0;
20
21  xscale = 6.;
22  yscale = 1.;
23  xoff = 0.;
24  yoff = 0.;
25
26  m=60;
27  x = xoff + xscale * ((1:m) + 1) / m;
28  y = yoff + yscale * (x.^2);
29
30  n=5;
31  xs = x((1:n) * 10 + 3);
32  ys = y((1:n) * 10 + 3);
33  xe = (1:n)./5;
34  yel = ys - (1:n);
35  yer = ys + 2*(1:n);
36
37  ## Plot the data points */
38  title("#frPLplot Example 3 - y=x#u2 #d(with error bars)");
39  plot(x, y, [xs' xe'], [ys' yel' yer'], '~g; ;');
40
41  pl_automatic_replot = t;
42
43endfunction
44