Mercurial > hg > octave-lyh
diff scripts/plot/line.m @ 17014:4d9862d9fce5
line.m: avoid calling "gca ()" when a parent axes is specified as prop/val pair (bug #39483).
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 16 Jul 2013 20:41:20 +0200 |
parents | ddac88d32d6a |
children | 761d2be77e78 |
line wrap: on
line diff
--- a/scripts/plot/line.m +++ b/scripts/plot/line.m @@ -35,7 +35,12 @@ ## make a default line object, and make it the current axes for ## the current figure. - tmp = __line__ (gca (), varargin{:}); + [ax, varargin] = __plt_get_axis_arg__ ("line", varargin{:}); + if (isempty (ax)) + ax = gca (); + endif + + tmp = __line__ (ax, varargin{:}); if (nargout > 0) h = tmp;