changeset 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 64d603f8bcd9
children 761d2be77e78
files scripts/plot/line.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/line.m	Fri Jul 19 00:53:11 2013 +0200
+++ b/scripts/plot/line.m	Tue Jul 16 20:41:20 2013 +0200
@@ -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;