# HG changeset patch # User Rik # Date 1386131947 28800 # Node ID b4b5ee91561aa647902a358507a792b80a93f4f3 # Parent d48ef9e24324b33b1878b67e341883aa98098e1e 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). diff -r d48ef9e24324 -r b4b5ee91561a scripts/plot/draw/fill.m --- a/scripts/plot/draw/fill.m Tue Dec 03 16:35:04 2013 -0800 +++ b/scripts/plot/draw/fill.m Tue Dec 03 20:39:07 2013 -0800 @@ -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{:});