Mercurial > hg > octave-lyh
comparison scripts/plot/patch.m @ 6807:0089a504fdd6
[project @ 2007-08-10 17:34:59 by jwe]
author | jwe |
---|---|
date | Fri, 10 Aug 2007 17:34:59 +0000 |
parents | |
children | 76e3d985ae56 |
comparison
equal
deleted
inserted
replaced
6806:afa9123c5faa | 6807:0089a504fdd6 |
---|---|
1 ## Copyright (C) 2005 John W. Eaton | |
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 2, or (at your option) | |
8 ## 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, write to the Free | |
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
18 ## 02110-1301, USA. | |
19 | |
20 ## -*- texinfo -*- | |
21 ## @deftypefn {Function File} {} patch () | |
22 ## @deftypefnx {Function File} {} patch (@var{x}, @var{y}, @var{c}) | |
23 ## @deftypefnx {Function File} {} patch (@var{x}, @var{y}, @var{c}, @var{opts}) | |
24 ## Create patch object from @var{x} and @var{y} with color @var{c} and insert in current | |
25 ## axes object. Return handle to patch object. | |
26 ## For an uniform colored patch, @var{c} can be given as [r, g, b]-vector, scalar value refering | |
27 ## to the current colormap, or string value (e.g. "r" or "red"). | |
28 ## @end deftypefn | |
29 | |
30 ## Author: jwe | |
31 | |
32 function h = patch (varargin) | |
33 | |
34 ## make a default patch object, and make it the current axes for | |
35 ## the current figure. | |
36 tmp = __patch__ (gca (), varargin{:}); | |
37 | |
38 if (nargout > 0) | |
39 h = tmp; | |
40 endif | |
41 | |
42 endfunction |