annotate scripts/plot/contour3.m @ 13141:e81ddf9cacd5

maint: untabify and remove trailing whitespace from source files * bicg.m, gmres.m, pkg.m: Untabify and remove trailing whitespace. * libcruft/Makefile.am, libcruft/blas-xtra/cdotc3.f, libcruft/blas-xtra/cmatm3.f, libcruft/blas-xtra/ddot3.f, libcruft/blas-xtra/dmatm3.f, libcruft/blas-xtra/sdot3.f, libcruft/blas-xtra/smatm3.f, libcruft/blas-xtra/zdotc3.f, libcruft/blas-xtra/zmatm3.f, libcruft/lapack-xtra/crsf2csf.f, libcruft/lapack-xtra/zrsf2csf.f, liboctave/Array.cc, liboctave/DASPK-opts.in, liboctave/DASRT-opts.in, liboctave/DASSL-opts.in, liboctave/LSODE-opts.in, liboctave/Makefile.a,mliboctave/Quad-opts.in, liboctave/Sparse-perm-op-defs.h, scripts/Makefile.a,mscripts/deprecated/glpkmex.m, scripts/general/blkdiag.m, scripts/general/interp1.m, scripts/general/profshow.m, scripts/general/quadl.m, scripts/general/triplequad.m, scripts/help/__makeinfo__.m, scripts/io/strread.m, scripts/io/textread.m, scripts/io/textscan.m, scripts/linear-algebra/rank.m, scripts/miscellaneous/gzip.m, scripts/miscellaneous/private/__xzip__.m, scripts/miscellaneous/tempdir.m, scripts/miscellaneous/unpack.m, scripts/pkg/pkg.m, scripts/plot/allchild.m, scripts/plot/ancestor.m, scripts/plot/cla.m, scripts/plot/clf.m, scripts/plot/findall.m, scripts/plot/findobj.m, scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/hggroup.m, scripts/plot/isfigure.m, scripts/plot/ishghandle.m, scripts/plot/legend.m, scripts/plot/line.m, scripts/plot/loglog.m, scripts/plot/patch.m, scripts/plot/print.m, scripts/plot/private/__quiver__.m, scripts/plot/private/__scatter__.m, scripts/plot/rectangle.m, scripts/plot/semilogx.m, scripts/plot/semilogy.m, scripts/plot/surface.m, scripts/plot/text.m, scripts/plot/title.m, scripts/plot/trisurf.m, scripts/plot/view.m, scripts/plot/whitebg.m, scripts/plot/xlabel.m, scripts/plot/xlim.m, scripts/plot/ylabel.m, scripts/plot/ylim.m, scripts/plot/zlabel.m, scripts/plot/zlim.m, scripts/polynomial/mkpp.m, scripts/polynomial/polygcd.m, scripts/polynomial/ppint.m, scripts/polynomial/ppjumps.m, scripts/polynomial/ppval.m, scripts/set/setxor.m, scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/sparse/spconvert.m, scripts/specfun/nthroot.m, scripts/strings/strmatch.m, scripts/strings/untabify.m, scripts/testfun/demo.m, scripts/testfun/example.m, src/DLD-FUNCTIONS/filter.cc, src/DLD-FUNCTIONS/mgorth.cc, src/DLD-FUNCTIONS/quadcc.cc, src/DLD-FUNCTIONS/str2double.cc, src/Makefile.a,msrc/gl-render.cc, src/gl2ps-renderer.cc, src/graphics.cc, src/octave-config.cc.in, src/octave-config.in, src/ov-class.h, src/ov-fcn.h, src/profiler.cc, src/profiler.h, src/pt-binop.cc, src/pt-unop.cc, src/symtab.cc, src/txt-eng-ft.cc: Remove trailing whitespace.
author John W. Eaton <jwe@octave.org>
date Thu, 15 Sep 2011 12:51:10 -0400
parents c792872f8942
children 22c50cbad2ce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 11427
diff changeset
1 ## Copyright (C) 2007-2011 David BAteman
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
2 ##
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
4 ##
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
8 ## your option) any later version.
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
9 ##
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
14 ##
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
18
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 9040
diff changeset
20 ## @deftypefn {Function File} {} contour3 (@var{z})
7317
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
21 ## @deftypefnx {Function File} {} contour3 (@var{z}, @var{vn})
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
22 ## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z})
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
23 ## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z}, @var{vn})
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
24 ## @deftypefnx {Function File} {} contour3 (@dots{}, @var{style})
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
25 ## @deftypefnx {Function File} {} contour3 (@var{h}, @dots{})
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
26 ## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contour3 (@dots{})
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
27 ## Plot level curves (contour lines) of the matrix @var{z}, using the
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
28 ## contour matrix @var{c} computed by @code{contourc} from the same
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
29 ## arguments; see the latter for their interpretation. The contours are
9040
dbd0c77e575e Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
30 ## plotted at the Z level corresponding to their contour. The set of
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
31 ## contour levels, @var{c}, is only returned if requested. For example:
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
32 ##
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
33 ## @example
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
34 ## @group
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
35 ## contour3 (peaks (19));
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
36 ## hold on
8507
cadc73247d65 style fixes
John W. Eaton <jwe@octave.org>
parents: 8289
diff changeset
37 ## surface (peaks (19), "facecolor", "none", "EdgeColor", "black")
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
38 ## colormap hot
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
39 ## @end group
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
40 ## @end example
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
41 ##
7317
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
42 ## The style to use for the plot can be defined with a line style @var{style}
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
43 ## in a similar manner to the line styles used with the @code{plot} command.
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
44 ## Any markers defined by @var{style} are ignored.
11c5f1ee553e [project @ 2007-12-14 17:42:55 by jwe]
jwe
parents: 7245
diff changeset
45 ##
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
46 ## The optional input and output argument @var{h} allows an axis handle to
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
47 ## be passed to @code{contour} and the handles to the contour objects to be
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
48 ## returned.
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
49 ## @seealso{contourc, patch, plot}
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
50 ## @end deftypefn
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
51
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
52 function [c, h] = contour3 (varargin)
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
53
7216
5389a52df87b [project @ 2007-11-29 19:07:29 by jwe]
jwe
parents: 7215
diff changeset
54 [xh, varargin, nargin] = __plt_get_axis_arg__ ("contour3", varargin{:});
5389a52df87b [project @ 2007-11-29 19:07:29 by jwe]
jwe
parents: 7215
diff changeset
55
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7175
diff changeset
56 oldh = gca ();
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7175
diff changeset
57 unwind_protect
7216
5389a52df87b [project @ 2007-11-29 19:07:29 by jwe]
jwe
parents: 7215
diff changeset
58 axes (xh);
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
59 newplot ();
8289
ac7f334d9652 Add contour group objects and the clabel function
David Bateman <dbateman@free.fr>
parents: 7317
diff changeset
60 [ctmp, htmp] = __contour__ (xh, "auto", varargin{:});
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7175
diff changeset
61 unwind_protect_cleanup
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7175
diff changeset
62 axes (oldh);
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7175
diff changeset
63 end_unwind_protect
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
64
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
65 if (! ishold ())
11427
dc983f92e774 contour3.m: Grid on be default for 3D plots.
Ben Abbott <bpabbott@mac.com>
parents: 11307
diff changeset
66 set (xh, "view", [-37.5, 30],
dc983f92e774 contour3.m: Grid on be default for 3D plots.
Ben Abbott <bpabbott@mac.com>
parents: 11307
diff changeset
67 "xgrid", "on", "ygrid", "on", "zgrid", "on");
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
68 endif
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
69
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
70 if (nargout > 0)
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
71 c = ctmp;
8289
ac7f334d9652 Add contour group objects and the clabel function
David Bateman <dbateman@free.fr>
parents: 7317
diff changeset
72 h = htmp;
7175
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
73 endif
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
74
5ff4da7bd2e7 [project @ 2007-11-14 20:36:48 by jwe]
jwe
parents:
diff changeset
75 endfunction
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
76
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
77 %!demo
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
78 %! contour3 (peaks (19));
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
79 %! hold on
8507
cadc73247d65 style fixes
John W. Eaton <jwe@octave.org>
parents: 8289
diff changeset
80 %! surface (peaks (19), "facecolor", "none", "edgecolor", "black")
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
81 %! colormap hot
11307
6ab93f01df07 contour3.m: Modify demo to avoid clipping mesh.
Ben Abbott <bpabbott@mac.com>
parents: 10793
diff changeset
82 %! axis tight
6ab93f01df07 contour3.m: Modify demo to avoid clipping mesh.
Ben Abbott <bpabbott@mac.com>
parents: 10793
diff changeset
83 %! zlim auto
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7216
diff changeset
84 %! hold off
11307
6ab93f01df07 contour3.m: Modify demo to avoid clipping mesh.
Ben Abbott <bpabbott@mac.com>
parents: 10793
diff changeset
85 %! box off