[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with __plt_get_axis_arg__.m
From: |
Michael Goffioul |
Subject: |
Re: Problem with __plt_get_axis_arg__.m |
Date: |
Mon, 3 Dec 2007 09:57:31 +0100 |
I'm not sure this patch will solve my problem.
Basically, the problem I have is that if I call patch with a group object
as parent, like in
patch (<hggroup_handle>, ...)
then __patch__ is called with an axes object (the ancestor of the group
object), like in
__patch__ (<axes_handle>, ...)
and the group object as parent is lost (that's what I meant by "screwing
up the parent"). If I follow your patch correctly, it will results in
__patch__ (NaN, ...)
I don't see how this will help me. The group object is still lost, as it
can never be returned by __plt_get_axis_arg__.
Michael.
On 12/2/07, David Bateman <address@hidden> wrote:
> Please use this version instead.. Previous version had a typo..
>
> D.
>
> Index: scripts/plot/__plt_get_axis_arg__.m
> ===================================================================
> RCS file: /usr/local/cvsroot/octave/scripts/plot/__plt_get_axis_arg__.m,v
> retrieving revision 1.9
> diff -c -r1.9 __plt_get_axis_arg__.m
> *** scripts/plot/__plt_get_axis_arg__.m 29 Nov 2007 19:07:29 -0000 1.9
> --- scripts/plot/__plt_get_axis_arg__.m 2 Dec 2007 21:31:57 -0000
> ***************
> *** 23,47 ****
> function [h, varargin, narg] = __plt_get_axis_arg__ (caller, varargin)
>
> if (islogical (caller))
> ! nogca = caller;
> caller = varargin{1};
> varargin(1) = [];
> else
> ! nogca = false;
> endif
>
> if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1}))
> tmp = varargin{1};
> obj = get (tmp);
> ! if (strcmp (obj.type, "axes") || strcmp (obj.type, "hggroup"))
> ! h = ancestor (tmp, "axes");
> ! varargin(1) = [];
> ! if (isempty (varargin))
> ! varargin = {};
> endif
> else
> error ("%s: expecting first argument to be axes handle", caller);
> endif
> else
> f = get (0, "currentfigure");
> if (isempty (f))
> --- 23,53 ----
> function [h, varargin, narg] = __plt_get_axis_arg__ (caller, varargin)
>
> if (islogical (caller))
> ! nogcaancestor = caller;
> caller = varargin{1};
> varargin(1) = [];
> else
> ! nogcaancestor = false;
> endif
>
> if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1}))
> tmp = varargin{1};
> obj = get (tmp);
> ! if (strcmp (obj.type, "axes"))
> ! h = tmp;
> ! elseif (strcmp (obj.type, "hggroup"))
> ! if (nogcaancestor)
> ! h = NaN;
> ! else
> ! h = ancestor (tmp, "axes");
> endif
> else
> error ("%s: expecting first argument to be axes handle", caller);
> endif
> + varargin(1) = [];
> + if (isempty (varargin))
> + varargin = {};
> + endif
> else
> f = get (0, "currentfigure");
> if (isempty (f))
> ***************
> *** 50,56 ****
> h = get (f, 'currentaxes');
> endif
> if (isempty (h))
> ! if (nogca)
> h = NaN;
> else
> h = gca ();
> --- 56,62 ----
> h = get (f, 'currentaxes');
> endif
> if (isempty (h))
> ! if (nogcaancestor)
> h = NaN;
> else
> h = gca ();
>
> 2007-12-02 David Bateman <address@hidden>
>
> * plot/__plt_get_axis__.m: Expand nogca flag to also prevent calls
> to ancestor.
>
>
- Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/01
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/01
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m,
Michael Goffioul <=
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, John W. Eaton, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/04
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/06
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/10