Mercurial > hg > octave-lyh
annotate scripts/plot/private/__errcomm__.m @ 16814:64e7bb01fce2
doc: Improve documentation for 2-D plot functions
* doc/interpreter/plot.txi: Rewrite documentation around get/set.
* libinterp/interpfcn/graphics.cc(Fget, Fset): Add seealso links. Add
additional calling forms for get().
* scripts/plot/bar.m, scripts/plot/barh.m, scripts/plot/comet.m,
scripts/plot/comet3.m, scripts/plot/contour.m, scripts/plot/contour3.m,
scripts/plot/contourc.m, scripts/plot/contourf.m, scripts/plot/errorbar.m,
scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/gco.m,
scripts/plot/ishghandle.m, scripts/plot/loglogerr.m, scripts/plot/pareto.m,
scripts/plot/pcolor.m, scripts/plot/pie.m, scripts/plot/pie3.m,
scripts/plot/plotmatrix.m, scripts/plot/plotyy.m, scripts/plot/polar.m,
scripts/plot/quiver.m, scripts/plot/quiver3.m, scripts/plot/rose.m,
scripts/plot/scatter.m, scripts/plot/semilogxerr.m, scripts/plot/semilogyerr.m,
scripts/plot/sombrero.m, scripts/plot/stairs.m, scripts/plot/stem.m,
scripts/plot/stem3.m: Improve docstrings.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 22 Jun 2013 17:40:52 -0700 |
parents | 5d3a684236b0 |
children | abf384f5d243 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1 ## Copyright (C) 2001-2012 Teemu Ikonen |
4019 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
4019 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
4019 | 18 |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
19 ## -*- texinfo -*- |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
20 ## @deftypefn {Function File} {} __errcomm__ (@var{caller}, @var{p}, @dots{}) |
6895 | 21 ## Undocumented internal function. |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
22 ## @end deftypefn |
4019 | 23 |
24 ## Created: 20.02.2001 | |
25 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi> | |
26 ## Keywords: errorbar, plotting | |
27 | |
6404 | 28 function retval = __errcomm__ (caller, p, varargin) |
4019 | 29 |
6257 | 30 if (nargin < 4) |
31 print_usage (); | |
4019 | 32 endif |
33 | |
4897 | 34 nargs = length (varargin); |
10580
1479b93ee655
Respect linestyleorder in errorbar plots
David Bateman <dbateman@free.fr>
parents:
10549
diff
changeset
|
35 retval = []; |
6257 | 36 k = 1; |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
37 data = cell (6,1); |
6257 | 38 while (k <= nargs) |
39 a = varargin{k++}; | |
40 if (isvector (a)) | |
41 a = a(:); | |
42 elseif (ismatrix (a)) | |
43 ; | |
44 else | |
45 usage ("%s (...)", caller); | |
4019 | 46 endif |
6257 | 47 sz = size (a); |
48 ndata = 1; | |
49 data{ndata} = a; | |
4897 | 50 while (k <= nargs) |
4019 | 51 a = varargin{k++}; |
6257 | 52 if (ischar (a) || iscellstr (a)) |
10580
1479b93ee655
Respect linestyleorder in errorbar plots
David Bateman <dbateman@free.fr>
parents:
10549
diff
changeset
|
53 retval = [retval; __errplot__(a, p, data{1:ndata})]; |
10549 | 54 break; |
6257 | 55 elseif (isvector (a)) |
10549 | 56 a = a(:); |
4030 | 57 elseif (ismatrix (a)) |
10549 | 58 ; |
4019 | 59 else |
10549 | 60 error ("wrong argument types"); |
6257 | 61 endif |
62 if (size (a) != sz) | |
10549 | 63 error ("argument sizes do not match"); |
4019 | 64 endif |
6257 | 65 data{++ndata} = a; |
66 if (ndata > 6) | |
10549 | 67 error ("too many arguments to a plot"); |
6257 | 68 endif |
4019 | 69 endwhile |
6257 | 70 endwhile |
4019 | 71 |
6257 | 72 if (! (ischar (a) || iscellstr (a))) |
10580
1479b93ee655
Respect linestyleorder in errorbar plots
David Bateman <dbateman@free.fr>
parents:
10549
diff
changeset
|
73 retval = [retval; __errplot__("~", p, data{1:ndata})]; |
6257 | 74 endif |
75 | |
76 drawnow (); | |
4019 | 77 |
78 endfunction |