6807
|
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}) |
6895
|
24 ## Create patch object from @var{x} and @var{y} with color @var{c} and |
|
25 ## insert in the current axes object. Return handle to patch object. |
|
26 ## |
|
27 ## For a uniform colored patch, @var{c} can be given as an RGB vector, |
|
28 ## scalar value referring to the current colormap, or string value (for |
|
29 ## example, "r" or "red"). |
6807
|
30 ## @end deftypefn |
|
31 |
|
32 ## Author: jwe |
|
33 |
|
34 function h = patch (varargin) |
|
35 |
|
36 ## make a default patch object, and make it the current axes for |
|
37 ## the current figure. |
|
38 tmp = __patch__ (gca (), varargin{:}); |
|
39 |
|
40 if (nargout > 0) |
|
41 h = tmp; |
|
42 endif |
|
43 |
|
44 endfunction |