diff scripts/plot/colorbar.m @ 10534:eb55e736060e

colorbar.m: Allow 'peer' option to be specified.
author Ben Abbott <bpabbott@mac.com>
date Mon, 19 Apr 2010 20:57:41 -0400
parents 568c7c041fac
children 95c3e38098bf
line wrap: on
line diff
--- a/scripts/plot/colorbar.m
+++ b/scripts/plot/colorbar.m
@@ -61,9 +61,9 @@
 	if (i > nargin)
 	  error ("colorbar: missing axes handle after \"peer\"");
 	else
-	  ax = vargin{i++}
+	  ax = varargin{i++};
 	  if (!isscalar (ax) || ! ishandle (ax)
-	      || strcmp (get (ax, "type"), "axes"))
+	      || ! strcmp (get (ax, "type"), "axes"))
 	    error ("colorbar: expecting an axes handle following \"peer\"");
 	  endif
 	endif
@@ -355,7 +355,7 @@
 %! clf
 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
 %! imagesc(x)
-%! colorbar("northoutside");
+%! colorbar("peer", gca (), "northoutside");
 
 %!demo
 %! clf