# HG changeset patch # User Pantxo Diribarne # Date 1374526684 -7200 # Node ID 1b549a0c3ca43e33bfe38b2f493e4a72ac4c99b1 # Parent 55b76fd1244b3b92c22d37a82fe4bfe26fdbda3f text.m: Update to use new __plt_get_axis_arg__. * scripts/plot/text.m: Update to use new __plt_get_axis_arg__. diff -r 55b76fd1244b -r 1b549a0c3ca4 scripts/plot/text.m --- a/scripts/plot/text.m Mon Jul 22 23:37:00 2013 +0200 +++ b/scripts/plot/text.m Mon Jul 22 22:58:04 2013 +0200 @@ -118,17 +118,23 @@ print_usage (); endif + ## Get axis argument which may be in a 'parent' PROP/VAL pair + [hax, varargin] = __plt_get_axis_arg__ ("text", varargin{:}); + + if (isempty (hax)) + hax = gca (); + endif + if (nx == ny && nx == nz && (nt == nx || nt == 1 || nx == 1)) pos = [x(:), y(:), z(:)]; - ca = gca (); htmp = zeros (nt, 1); if (nx == 1) - htmp = __go_text__ (ca, "string", label{1}, + htmp = __go_text__ (hax, "string", label{1}, varargin{:}, "position", pos); elseif (nx == nt) for n = 1:nt - htmp(n) = __go_text__ (ca, "string", label{n}, + htmp(n) = __go_text__ (hax, "string", label{n}, varargin{:}, "position", pos(n,:)); endfor