# HG changeset patch # User jwe # Date 790916090 0 # Node ID 1b3a8703164191c745dbfc3108b21db2e1ad6975 # Parent a08b7d48e3bc2938599d0eb1f6e4c1310551cb2e [project @ 1995-01-24 02:54:50 by jwe] diff --git a/scripts/image/colormap.m b/scripts/image/colormap.m --- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -34,7 +34,9 @@ global CURRENT_COLOR_MAP - cmap_name = "CURRENT_COLOR_MAP"; + if (nargin > 1) + usage ("colormap (map)"); + endif if (nargin == 1) if (isstr (map)) @@ -47,11 +49,9 @@ # Set the new color map CURRENT_COLOR_MAP = map; endif - elseif (nargin == 0 && exist (cmap_name) == 0) + elseif (! exist ("CURRENT_COLOR_MAP")) # If global color map doesn't exist, create the default map. CURRENT_COLOR_MAP = gray; - else - usage ("colormap (map)"); endif # Return current color map.