changeset 4529:78954aeaf321

[project @ 2003-10-04 19:35:36 by jwe]
author jwe
date Sat, 04 Oct 2003 19:35:36 +0000
parents 7a85d54d0cbd
children e8d87fefd144
files scripts/ChangeLog scripts/plot/__axis_label__.m scripts/plot/title.m scripts/plot/xlabel.m scripts/plot/ylabel.m scripts/plot/zlabel.m
diffstat 6 files changed, 53 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/ChangeLog	Sat Oct 04 19:35:36 2003 +0000
@@ -1,3 +1,8 @@
+2003-10-04  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* plot/__axis_label__.m, plot/xlabel.m, plot/ylabel.m,
+	plot/zlabel.m, plot/title.m: Return a value if nargout > 0.
+
 2003-10-02  Quentin Spencer  <qspencer@ieee.org>
 
 	* statistics/base/mean.m: Fix missing semicolon problem.
--- a/scripts/plot/__axis_label__.m	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/plot/__axis_label__.m	Sat Oct 04 19:35:36 2003 +0000
@@ -24,7 +24,7 @@
 
 ## Author: jwe
 
-function __axis_label__ (caller, text)
+function h = __axis_label__ (caller, text)
 
   if (nargin == 0)
     usage ("__axis_label__ (caller, text)");
@@ -39,4 +39,12 @@
     usage ("%s (text)", caller);
   endif
 
+  ## XXX FIXME XXX -- eventually, we will return a graphics handle.  For
+  ## now, return something, so that calls that expect a handle won't
+  ## fail (at least immediately).
+
+  if (nargout > 0)
+    h = -1;
+  endif
+
 endfunction
--- a/scripts/plot/title.m	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/plot/title.m	Sat Oct 04 19:35:36 2003 +0000
@@ -27,7 +27,7 @@
 
 ## Author: jwe
 
-function title (text)
+function h = title (text)
 
   if (nargin != 1)
     usage ("title (text)");
@@ -40,4 +40,12 @@
     error ("title: text must be a string");
   endif
 
+  ## XXX FIXME XXX -- eventually, we will return a graphics handle.  For
+  ## now, return something, so that calls that expect a handle won't
+  ## fail (at least immediately).
+
+  if (nargout > 0)
+    h = -1;
+  endif
+
 endfunction
--- a/scripts/plot/xlabel.m	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/plot/xlabel.m	Sat Oct 04 19:35:36 2003 +0000
@@ -30,8 +30,16 @@
 
 ## Author: jwe
 
-function xlabel (varargin)
+function h = xlabel (varargin)
+
+  ## XXX FIXME XXX -- eventually, we will return a graphics handle.  For
+  ## now, return something, so that calls that expect a handle won't
+  ## fail (at least immediately).
 
-  __axis_label__ ("xlabel", varargin{:});
+  if (nargout > 0)
+    h = __axis_label__ ("xlabel", varargin{:});
+  else
+    __axis_label__ ("xlabel", varargin{:});
+  endif
 
 endfunction
--- a/scripts/plot/ylabel.m	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/plot/ylabel.m	Sat Oct 04 19:35:36 2003 +0000
@@ -24,8 +24,16 @@
 
 ## Author: jwe
 
-function ylabel (varargin)
+function h = ylabel (varargin)
+
+  ## XXX FIXME XXX -- eventually, we will return a graphics handle.  For
+  ## now, return something, so that calls that expect a handle won't
+  ## fail (at least immediately).
 
-  __axis_label__ ("ylabel", varargin{:});
+  if (nargout > 0)
+    h = __axis_label__ ("ylabel", varargin{:});
+  else
+    __axis_label__ ("ylabel", varargin{:});
+  endif
 
 endfunction
--- a/scripts/plot/zlabel.m	Fri Oct 03 18:15:57 2003 +0000
+++ b/scripts/plot/zlabel.m	Sat Oct 04 19:35:36 2003 +0000
@@ -26,8 +26,16 @@
 ## Created: 3 July 95
 ## Adapted-By: jwe
 
-function zlabel (varargin)
+function h = zlabel (varargin)
+
+  ## XXX FIXME XXX -- eventually, we will return a graphics handle.  For
+  ## now, return something, so that calls that expect a handle won't
+  ## fail (at least immediately).
 
-  __axis_label__ ("zlabel", varargin{:});
+  if (nargout > 0)
+    h = __axis_label__ ("zlabel", varargin{:});
+  else
+    __axis_label__ ("zlabel", varargin{:});
+  endif
 
 endfunction