Mercurial > hg > octave-nkf
changeset 17039:854cfc72c64f
patch.m: Update to use new __plt_get_axis_arg__.
* scripts/plot/patch.m: Update to use new __plt_get_axis_arg__.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 22 Jul 2013 23:08:14 +0200 |
parents | db90efd8f32b |
children | 55b76fd1244b |
files | scripts/plot/patch.m |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/patch.m +++ b/scripts/plot/patch.m @@ -45,16 +45,20 @@ function retval = patch (varargin) - [h, varargin] = __plt_get_axis_arg__ ("patch", varargin{:}); - - [tmp, failed] = __patch__ (h, varargin{:}); + [hax, varargin] = __plt_get_axis_arg__ ("patch", varargin{:}); + + if (isempty (hax)) + hax = gca (); + endif + + [htmp, failed] = __patch__ (hax, varargin{:}); if (failed) print_usage (); endif if (nargout > 0) - retval = tmp; + retval = htmp; endif endfunction