Mercurial > hg > octave-nkf
annotate scripts/plot/ezplot.m @ 10846:a4f482e66b65
Grammarcheck more of the documentation.
Use @noindent macro appropriately.
Limit line length to 80 characters.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 01 Aug 2010 20:22:17 -0700 |
parents | 693e22af08ae |
children | fd0a3ac60b0e |
rev | line source |
---|---|
9245 | 1 ## Copyright (C) 2008, 2009 David Bateman |
8046 | 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 | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
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 | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
9245
diff
changeset
|
20 ## @deftypefn {Function File} {} ezplot (@var{f}) |
8046 | 21 ## @deftypefnx {Function File} {} ezplot (@var{fx}, @var{fy}) |
22 ## @deftypefnx {Function File} {} ezplot (@dots{}, @var{dom}) | |
23 ## @deftypefnx {Function File} {} ezplot (@dots{}, @var{n}) | |
24 ## @deftypefnx {Function File} {} ezplot (@var{h}, @dots{}) | |
25 ## @deftypefnx {Function File} {@var{h} =} ezplot (@dots{}) | |
26 ## | |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8046
diff
changeset
|
27 ## Plots in two-dimensions the curve defined by @var{f}. The function |
8046 | 28 ## @var{f} may be a string, inline function or function handle and can |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8046
diff
changeset
|
29 ## have either one or two variables. If @var{f} has one variable, then |
8046 | 30 ## the function is plotted over the domain @code{-2*pi < @var{x} < 2*pi} |
31 ## with 500 points. | |
32 ## | |
33 ## If @var{f} has two variables then @code{@var{f}(@var{x},@var{y}) = 0} | |
34 ## is calculated over the meshed domain @code{-2*pi < @var{x} | @var{y} | |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
35 ## < 2*pi} with 60 by 60 in the mesh. For example: |
8046 | 36 ## |
37 ## @example | |
38 ## ezplot (@@(@var{x}, @var{y}) @var{x} .^ 2 - @var{y} .^ 2 - 1) | |
39 ## @end example | |
40 ## | |
41 ## If two functions are passed as strings, inline functions or function | |
42 ## handles, then the parametric function | |
43 ## | |
44 ## @example | |
45 ## @group | |
46 ## @var{x} = @var{fx} (@var{t}) | |
47 ## @var{y} = @var{fy} (@var{t}) | |
48 ## @end group | |
49 ## @end example | |
50 ## | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
51 ## @noindent |
8046 | 52 ## is plotted over the domain @code{-2*pi < @var{t} < 2*pi} with 500 |
53 ## points. | |
54 ## | |
55 ## If @var{dom} is a two element vector, it represents the minimum and maximum | |
9040
dbd0c77e575e
Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents:
8046
diff
changeset
|
56 ## value of @var{x}, @var{y} and @var{t}. If it is a four element |
8046 | 57 ## vector, then the minimum and maximum values of @var{x} and @var{t} |
58 ## are determined by the first two elements and the minimum and maximum | |
59 ## of @var{y} by the second pair of elements. | |
60 ## | |
61 ## @var{n} is a scalar defining the number of points to use in plotting | |
62 ## the function. | |
63 ## | |
64 ## The optional return value @var{h} provides a list of handles to the | |
65 ## the line objects plotted. | |
66 ## | |
67 ## @seealso{plot, ezplot3} | |
68 ## @end deftypefn | |
69 | |
70 function retval = ezplot (varargin) | |
71 | |
72 [h, needusage] = __ezplot__ ("plot", varargin{:}); | |
73 | |
74 if (needusage) | |
75 print_usage (); | |
76 endif | |
77 | |
78 if (nargout > 0) | |
79 retval = h; | |
80 endif | |
81 endfunction | |
82 | |
83 %!demo | |
84 %! ezplot (@cos, @sin) | |
85 | |
86 %!demo | |
87 %! ezplot ("1/x") | |
88 | |
89 %!demo | |
90 %! ezplot (inline("x^2 - y^2 = 1")) |