1## Copyright (C) 2007, 2008, 2009 David BAteman
3## This file is part of Octave.
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.
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.
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/>.
20## @deftypefn {Function File} {} contour3 (@var{z})
21## @deftypefnx {Function File} {} contour3 (@var{z}, @var{vn})
22## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z})
23## @deftypefnx {Function File} {} contour3 (@var{x}, @var{y}, @var{z}, @var{vn})
24## @deftypefnx {Function File} {} contour3 (@dots{}, @var{style})
25## @deftypefnx {Function File} {} contour3 (@var{h}, @dots{})
26## @deftypefnx {Function File} {[@var{c}, @var{h}] =} contour3 (@dots{})
27## Plot level curves (contour lines) of the matrix @var{z}, using the
28## contour matrix @var{c} computed by @code{contourc} from the same
29## arguments; see the latter for their interpretation. The contours are
30## plotted at the Z level corresponding to their contour. The set of
31## contour levels, @var{c}, is only returned if requested. For example:
35## contour3 (peaks (19));
37## surface (peaks (19), "facecolor", "none", "EdgeColor", "black")
42## The style to use for the plot can be defined with a line style @var{style}
43## in a similar manner to the line styles used with the @code{plot} command.
44## Any markers defined by @var{style} are ignored.
46## The optional input and output argument @var{h} allows an axis handle to
47## be passed to @code{contour} and the handles to the contour objects to be
49## @seealso{contourc, patch, plot}
52function [c, h] = contour3 (varargin)
54 [xh, varargin, nargin] = __plt_get_axis_arg__ ("contour3", varargin{:});
60 [ctmp, htmp] = __contour__ (xh, "auto", varargin{:});
61 unwind_protect_cleanup
66 set (xh, "view", [-37.5, 30]);
77%! contour3 (peaks (19));
79%! surface (peaks (19), "facecolor", "none", "edgecolor", "black")