Mercurial > hg > octave-nkf
diff 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 |
line wrap: on
line diff
--- a/scripts/plot/draw/fill.m +++ b/scripts/plot/draw/fill.m @@ -93,6 +93,13 @@ for i = 1 : length (iargs) cdata = varargin{iargs(i) + 2}; + ## For Matlab compatibility, replicate cdata to match size of data + if (iscolumn (cdata)) + sz = size (varargin{iargs(i)}); + if (all (sz > 1)) + cdata = repmat (cdata, [1, sz(2)]); + endif + endif [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata, opts{:});