Mercurial > hg > octave-lyh
diff scripts/plot/__plt_get_axis_arg__.m @ 17025:75d115e329b7
__plt_get_axis_arg__.m: Correctly handle 'parent' property when parent is hggroup.
* scripts/plot/__plt_get_axis_arg__.m: Don't delete 'parent'/value pair
if it represents an hggroup. Downstream plot function will use this
property.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 20 Jul 2013 18:42:25 -0700 |
parents | 761d2be77e78 |
children | 08dd9458684a |
line wrap: on
line diff
--- a/scripts/plot/__plt_get_axis_arg__.m +++ b/scripts/plot/__plt_get_axis_arg__.m @@ -45,9 +45,8 @@ && varargin{1} != 0 && ! isfigure (varargin{1})) htmp = varargin{1}; obj = get (htmp); - if ((strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend")) - || strcmp (obj.type, "hggroup")) - h = ancestor (htmp, "axes"); + if (strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend")) + h = htmp; varargin(1) = []; else error ("%s: expecting first argument to be axes handle", caller); @@ -56,12 +55,12 @@ if (parent < numel (varargin) && ishandle (varargin{parent+1})) htmp = varargin{parent+1}; obj = get (htmp); - if ((strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend")) - || strcmp (obj.type, "hggroup")) - h = ancestor (htmp, "axes"); + if (strcmp (obj.type, "axes") && ! strcmp (obj.tag, "legend")) + h = htmp; varargin(parent:parent+1) = []; else - error ("%s: expecting parent value to be axes handle", caller); + ## 'parent' property for some other type like hggroup + h = ancestor (htmp, "axes"); endif else error ("%s: expecting parent value to be axes handle", caller);