annotate scripts/plot/draw/ezcontour.m @ 30564:796f54d4ddbf stable

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2021. In all .txi and .texi files except gpl.txi and gpl.texi in the doc/liboctave and doc/interpreter directories, change the copyright to "Octave Project Developers", the same as used for other source files. Update copyright notices for 2022 (not done since 2019). For gpl.txi and gpl.texi, change the copyright notice to be "Free Software Foundation, Inc." and leave the date at 2007 only because this file only contains the text of the GPL, not anything created by the Octave Project Developers. Add Paul Thomas to contributors.in.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Dec 2021 18:22:40 -0500
parents 0a5b15007766
children 597f3ee61a48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
3 ## Copyright (C) 2007-2022 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
7 ##
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
8 ## This file is part of Octave.
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
13 ## (at your option) any later version.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
14 ##
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
18 ## GNU General Public License for more details.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
19 ##
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
25
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
26 ## -*- texinfo -*-
20852
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
27 ## @deftypefn {} {} ezcontour (@var{f})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
28 ## @deftypefnx {} {} ezcontour (@dots{}, @var{dom})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
29 ## @deftypefnx {} {} ezcontour (@dots{}, @var{n})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
30 ## @deftypefnx {} {} ezcontour (@var{hax}, @dots{})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
31 ## @deftypefnx {} {@var{h} =} ezcontour (@dots{})
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
32 ##
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
33 ## Plot the contour lines of a function.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
34 ##
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
35 ## @var{f} is a string, inline function, or function handle with two arguments
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
36 ## defining the function. By default the plot is over the meshed domain
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
37 ## @code{-2*pi <= @var{x} | @var{y} <= 2*pi} with 60 points in each dimension.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
38 ##
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
39 ## If @var{dom} is a two element vector, it represents the minimum and maximum
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
40 ## values of both @var{x} and @var{y}. If @var{dom} is a four element vector,
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
41 ## then the minimum and maximum values are @code{[xmin xmax ymin ymax]}.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
42 ##
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
43 ## @var{n} is a scalar defining the number of points to use in each dimension.
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
44 ##
24431
0c6cedafc71e doc: Use 'axes' rather than 'axis' appropriately in docstrings.
Rik <rik@octave.org>
parents: 23219
diff changeset
45 ## If the first argument @var{hax} is an axes handle, then plot into this axes,
17122
eaab03308c0b doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents: 16993
diff changeset
46 ## rather than the current axes returned by @code{gca}.
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
47 ##
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
48 ## The optional return value @var{h} is a graphics handle to the created plot.
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
49 ##
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
50 ## Example:
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
51 ##
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
52 ## @example
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
53 ## @group
14327
4d917a6a858b doc: Use Octave coding conventions in @example blocks of docstrings.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
54 ## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
55 ## ezcontour (f, [-3, 3]);
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
56 ## @end group
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
57 ## @end example
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
58 ##
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
59 ## @seealso{contour, ezcontourf, ezplot, ezmeshc, ezsurfc}
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
60 ## @end deftypefn
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
61
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
62 function h = ezcontour (varargin)
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
63
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
64 [htmp, needusage] = __ezplot__ ("contour", varargin{:});
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
65
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
66 if (needusage)
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
67 print_usage ();
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
68 endif
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
69
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
70 if (nargout > 0)
16993
78f57b14535c Overhaul ez* family of plot functions.
Rik <rik@octave.org>
parents: 14335
diff changeset
71 h = htmp;
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
72 endif
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
73
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
74 endfunction
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
75
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
76
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
77 %!demo
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
78 %! clf;
22302
1c4cd12987f5 Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents: 20852
diff changeset
79 %! colormap ("default");
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
80 %! f = @(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2);
7337
e70789e0cd92 [project @ 2007-12-28 21:04:44 by jwe]
jwe
parents:
diff changeset
81 %! ezcontour (f, [-3, 3]);