# HG changeset patch # User Rik # Date 1327299769 28800 # Node ID f9bd63f5ddd065c291b6c660e90c24559d8f0bba # Parent 4e6436a60b624a712839beecad1146769f617cb7 contrast.m: Improve demo. * contrast.m: Improve demo. diff --git a/scripts/image/contrast.m b/scripts/image/contrast.m --- a/scripts/image/contrast.m +++ b/scripts/image/contrast.m @@ -50,11 +50,14 @@ %!demo %! clf; %! img = reshape (1:100, 10, 10); -%! image (img); -%! colormap (gray (10)); -%! title ("Image with default 256 gray levels"); -%! input ("Press to continue: ", "s"); -%! colormap (contrast (img)); +%! imagesc (img); +%! colormap (gray (64)); +%! title ("Image with default 64 gray levels"); +%! pos = get (gcf, "position"); +%! pos(1) += pos(3) + 15; +%! figure ("position", pos); +%! colormap (contrast (img, 10)); +%! imagesc (img); %! title ("Image with contrast enhanced"); %!assert (contrast (1:100,10), [([0:9]/9)',([0:9]/9)',([0:9]/9)'], 1e-10)