comparison scripts/plot/draw/fill.m @ 18072:b4b5ee91561a

fill.m: replicate cdata to match size of data for Matlab compatibility (bug #40777). * fill.m: replicate cdata to match size of data for Matlab compatibility (bug #40777).
author Rik <rik@octave.org>
date Tue, 03 Dec 2013 20:39:07 -0800
parents 8e7d2ee1254d
children d7c88126ac03 fe689210525c
comparison
equal deleted inserted replaced
18071:d48ef9e24324 18072:b4b5ee91561a
91 unwind_protect 91 unwind_protect
92 set (hax, "nextplot", "add"); 92 set (hax, "nextplot", "add");
93 93
94 for i = 1 : length (iargs) 94 for i = 1 : length (iargs)
95 cdata = varargin{iargs(i) + 2}; 95 cdata = varargin{iargs(i) + 2};
96 ## For Matlab compatibility, replicate cdata to match size of data
97 if (iscolumn (cdata))
98 sz = size (varargin{iargs(i)});
99 if (all (sz > 1))
100 cdata = repmat (cdata, [1, sz(2)]);
101 endif
102 endif
96 103
97 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata, 104 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata,
98 opts{:}); 105 opts{:});
99 if (fail) 106 if (fail)
100 print_usage (); 107 print_usage ();