[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2.9.14+ hold issue
From: |
David Bateman |
Subject: |
Re: 2.9.14+ hold issue |
Date: |
Wed, 26 Sep 2007 11:12:10 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Fredrik Lingvall wrote:
> On the current CVS (and gnuplot CVS),
>
> octave:69> figure(2);
> octave:70> clf;
> octave:71>
> octave:71> plot(Ro(:,1),Ro(:,3),'o');
> octave:72> hold
> warning: __plt_get_axis_arg__: some elements in list of return values
> are undefined
> error: invalid conversion from matrix to real vector
> error: get: expecting graphics handle as first argument
> error: evaluating assignment expression near line 44, column 14
> error: called from `hold' in file
> `/usr/local//share/octave/2.9.14+/m/plot/hold.m'
> octave:72> plot(Ro_orig(:,1),Ro_orig(:,3),'r*');
> octave:73>
>
I believe the attached patch addresses this
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
*** ./scripts/plot/__plt_get_axis_arg__.m.orig9 2007-09-15 10:18:47.000000000
+0200
--- ./scripts/plot/__plt_get_axis_arg__.m 2007-09-26 11:09:21.328986940
+0200
***************
*** 23,45 ****
function [h, varargin] = __plt_get_axis_arg__ (caller, varargin)
!
! if (nargin > 1)
tmp = varargin{1};
! if (ishandle (tmp))
! obj = get (tmp);
! if (strcmp (obj.type, "axes"))
! h = tmp;
! varargin(1) = [];
! if (isempty (varargin))
! varargin = {};
! endif
! else
! error ("%s: expecting first argument to be axes handle", caller);
endif
else
! h = gca ();
endif
endif
endfunction
--- 23,43 ----
function [h, varargin] = __plt_get_axis_arg__ (caller, varargin)
! if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1}))
tmp = varargin{1};
! obj = get (tmp);
! if (strcmp (obj.type, "axes"))
! h = tmp;
! varargin(1) = [];
! if (isempty (varargin))
! varargin = {};
endif
else
! error ("%s: expecting first argument to be axes handle", caller);
endif
+ else
+ h = gca ();
+ varargin = {};
endif
endfunction
2007-09-26 David Bateman <address@hidden>
* plot/__plt_get_axis_arg__.m: Treat case of empty "varargin"
needed for calls to "hold" without an argument.