octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with __plt_get_axis_arg__.m


From: David Bateman
Subject: Re: Problem with __plt_get_axis_arg__.m
Date: Sun, 02 Dec 2007 22:32:46 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]