Mercurial > hg > octave-lyh
diff scripts/plot/colorbar.m @ 8190:73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Oct 2008 21:06:05 -0400 |
parents | c066714ee5d5 |
children | f6ca8ff51818 |
line wrap: on
line diff
--- a/scripts/plot/colorbar.m +++ b/scripts/plot/colorbar.m @@ -51,7 +51,7 @@ function colorbar (varargin) - if (nargin > 0 && strcmpi(varargin{1}, "peer")) + if (nargin > 0 && strcmpi (varargin{1}, "peer")) if (nargin > 1) ax = varargin{2}; if (!isscalar (ax) || ! ishandle (ax) @@ -71,13 +71,12 @@ if (length(arg) < 1) pos = "eastoutside"; elseif (ischar (arg)) - arg = tolower (arg); - if (strcmp (arg, "off") || strcmp (arg, "none")) + if (strcmpi (arg, "off") || strcmpi (arg, "none")) pos = "none"; - elseif (strcmp (arg, "north") || strcmp (arg, "south") - || strcmp (arg, "east") || strcmp (arg, "west") - || strcmp (arg, "northoutside") || strcmp (arg, "southoutside") - || strcmp (arg, "eastoutside") || strcmp (arg, "westoutside")) + elseif (strcmpi (arg, "north") || strcmpi (arg, "south") + || strcmpi (arg, "east") || strcmpi (arg, "west") + || strcmpi (arg, "northoutside") || strcmpi (arg, "southoutside") + || strcmpi (arg, "eastoutside") || strcmpi (arg, "westoutside")) pos = arg; else error ("colorbar: unrecognized position argument");