Mercurial > hg > octave-lyh
comparison scripts/plot/contour.m @ 3737:b736f8b8f0a1
[project @ 2000-11-16 18:01:08 by jwe]
author | jwe |
---|---|
date | Thu, 16 Nov 2000 18:01:10 +0000 |
parents | f8dde1807dee |
children | c8c1ead8474f |
comparison
equal
deleted
inserted
replaced
3736:ac4609ffc702 | 3737:b736f8b8f0a1 |
---|---|
16 ## along with Octave; see the file COPYING. If not, write to the Free | 16 ## along with Octave; see the file COPYING. If not, write to the Free |
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA | 17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
18 ## 02111-1307, USA. | 18 ## 02111-1307, USA. |
19 | 19 |
20 ## -*- texinfo -*- | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function File} {} contour (@var{z}, @var{n}, @var{x}, @var{y}) | 21 ## @deftypefn {Function File} {} contour (@var{z}, @var{n}) |
22 ## @deftypefnx {Function File} {} contour (@var{x}, @var{y}, @var{z}, @var{n}) | |
22 ## Make a contour plot of the three-dimensional surface described by | 23 ## Make a contour plot of the three-dimensional surface described by |
23 ## @var{z}. Someone needs to improve @code{gnuplot}'s contour routines | 24 ## @var{z}. Someone needs to improve @code{gnuplot}'s contour routines |
24 ## before this will be very useful. | 25 ## before this will be very useful. |
25 ## @end deftypefn | 26 ## @end deftypefn |
26 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour, | 27 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour, |
27 ## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title} | 28 ## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title} |
28 | 29 |
29 ## Author: jwe | 30 ## Author: jwe |
30 | 31 |
31 function contour (z, n, x, y) | 32 function contour (x, y, z, n) |
32 | |
33 if (nargin == 1) | |
34 n = 10; | |
35 endif | |
36 | 33 |
37 ## XXX FIXME XXX -- these plot states should really just be set | 34 ## XXX FIXME XXX -- these plot states should really just be set |
38 ## temporarily, probably inside an unwind_protect block, but there is | 35 ## temporarily, probably inside an unwind_protect block, but there is |
39 ## no way to determine their current values. | 36 ## no way to determine their current values. |
40 | 37 |
41 if (nargin == 1 || nargin == 2) | 38 if (nargin == 1 || nargin == 2) |
39 z = x; | |
40 if (nargin == 1) | |
41 n = 10; | |
42 else | |
43 n = y; | |
44 endif | |
42 if (is_matrix (z)) | 45 if (is_matrix (z)) |
43 gset nosurface; | 46 gset nosurface; |
44 gset contour; | 47 gset contour; |
45 gset cntrparam bspline; | 48 gset cntrparam bspline; |
46 if (is_scalar (n)) | 49 if (is_scalar (n)) |