comparison scripts/plot/draw/fill.m @ 19628:fe689210525c gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:05:42 -0500
parents b4b5ee91561a 446c46af4b42
children 0e1f5a750d00
comparison
equal deleted inserted replaced
19624:6d75f1683ce8 19628:fe689210525c
25 ## Create one or more filled 2-D polygons. 25 ## Create one or more filled 2-D polygons.
26 ## 26 ##
27 ## The inputs @var{x} and @var{y} are the coordinates of the polygon vertices. 27 ## The inputs @var{x} and @var{y} are the coordinates of the polygon vertices.
28 ## If the inputs are matrices then the rows represent different vertices and 28 ## If the inputs are matrices then the rows represent different vertices and
29 ## each column produces a different polygon. @code{fill} will close any open 29 ## each column produces a different polygon. @code{fill} will close any open
30 ## polygons before plotting. 30 ## polygons before plotting.
31 ## 31 ##
32 ## The input @var{c} determines the color of the polygon. The simplest form 32 ## The input @var{c} determines the color of the polygon. The simplest form
33 ## is a single color specification such as a @code{plot} format or an 33 ## is a single color specification such as a @code{plot} format or an
34 ## RGB-triple. In this case the polygon(s) will have one unique color. If 34 ## RGB-triple. In this case the polygon(s) will have one unique color. If
35 ## @var{c} is a vector or matrix then the color data is first scaled using 35 ## @var{c} is a vector or matrix then the color data is first scaled using
74 74
75 opts = {}; 75 opts = {};
76 if (numel (varargin) > iargs(end) + 2) 76 if (numel (varargin) > iargs(end) + 2)
77 opts = varargin(iargs(end)+3 : end); 77 opts = varargin(iargs(end)+3 : end);
78 endif 78 endif
79 79
80 if (! all (cellfun (@(x) iscolorspec (x), varargin(iargs + 2)))) 80 if (! all (cellfun (@(x) iscolorspec (x), varargin(iargs + 2))))
81 print_usage (); 81 print_usage ();
82 endif 82 endif
83 83
84 oldfig = []; 84 oldfig = [];
104 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata, 104 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata,
105 opts{:}); 105 opts{:});
106 if (fail) 106 if (fail)
107 print_usage (); 107 print_usage ();
108 endif 108 endif
109 109
110 hlist(end+1, 1) = htmp; 110 hlist(end+1, 1) = htmp;
111 endfor 111 endfor
112 112
113 unwind_protect_cleanup 113 unwind_protect_cleanup
114 if (strcmp (old_nxtplt, "replace")) 114 if (strcmp (old_nxtplt, "replace"))