# HG changeset patch # User Soren Hauberg # Date 1256210820 -7200 # Node ID 9357d0e3d5e0a623509a864c8e09717ebdf621f4 # Parent 584ca012b9e84ea469447e43650b48c4ca315ce5 Add demos for colormap functions diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/ChangeLog --- a/scripts/ChangeLog Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/ChangeLog Thu Oct 22 13:27:00 2009 +0200 @@ -1,3 +1,10 @@ +2009-10-22 Soren Hauberg + + * image/autumn.m, image/bone.m, image/cool.m, image/copper.m, image/flag.m, + image/gmap40.m, image/gray.m, image/hot.m, image/hsv.m, image/jet.m, + image/ocean.m, image/pink.m, image/prism.m, image/rainbow.m, image/spring.m, + image/summer.m, image/white.m, image/winter.m: add demos. + 2009-10-20 Soren Hauberg * general/interp2.m: improved error checking and support for bicubic diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/autumn.m --- a/scripts/image/autumn.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/autumn.m Thu Oct 22 13:27:00 2009 +0200 @@ -50,3 +50,10 @@ endif endfunction + +%!demo +%! ## Show the 'autumn' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap autumn + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/bone.m --- a/scripts/image/bone.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/bone.m Thu Oct 22 13:27:00 2009 +0200 @@ -53,3 +53,10 @@ map = []; endif endfunction + +%!demo +%! ## Show the 'bone' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap bone + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/cool.m --- a/scripts/image/cool.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/cool.m Thu Oct 22 13:27:00 2009 +0200 @@ -50,3 +50,10 @@ endif endfunction + +%!demo +%! ## Show the 'cool' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap cool + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/copper.m --- a/scripts/image/copper.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/copper.m Thu Oct 22 13:27:00 2009 +0200 @@ -51,3 +51,10 @@ endif endfunction + +%!demo +%! ## Show the 'copper' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap copper + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/flag.m --- a/scripts/image/flag.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/flag.m Thu Oct 22 13:27:00 2009 +0200 @@ -51,3 +51,10 @@ endif endfunction + +%!demo +%! ## Show the 'flag' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap flag + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/gmap40.m --- a/scripts/image/gmap40.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/gmap40.m Thu Oct 22 13:27:00 2009 +0200 @@ -47,3 +47,10 @@ endif endfunction + +%!demo +%! ## Show the 'gmap40' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap gmap40 + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/gray.m --- a/scripts/image/gray.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/gray.m Thu Oct 22 13:27:00 2009 +0200 @@ -45,3 +45,10 @@ map = [ gr, gr, gr ] / (number - 1); endfunction + +%!demo +%! ## Show the 'gray' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap gray + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/hot.m --- a/scripts/image/hot.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/hot.m Thu Oct 22 13:27:00 2009 +0200 @@ -51,3 +51,10 @@ endif endfunction + +%!demo +%! ## Show the 'hot' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap hot + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/hsv.m --- a/scripts/image/hsv.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/hsv.m Thu Oct 22 13:27:00 2009 +0200 @@ -53,3 +53,10 @@ endif endfunction + +%!demo +%! ## Show the 'hsv' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap hsv + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/jet.m --- a/scripts/image/jet.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/jet.m Thu Oct 22 13:27:00 2009 +0200 @@ -54,3 +54,10 @@ endif endfunction + +%!demo +%! ## Show the 'jet' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap jet + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/ocean.m --- a/scripts/image/ocean.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/ocean.m Thu Oct 22 13:27:00 2009 +0200 @@ -54,3 +54,10 @@ map = [ r, g, b ] / (number - 1); endfunction + +%!demo +%! ## Show the 'ocean' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap ocean + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/pink.m --- a/scripts/image/pink.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/pink.m Thu Oct 22 13:27:00 2009 +0200 @@ -54,3 +54,10 @@ endif endfunction + +%!demo +%! ## Show the 'pink' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap pink + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/prism.m --- a/scripts/image/prism.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/prism.m Thu Oct 22 13:27:00 2009 +0200 @@ -47,3 +47,10 @@ endif endfunction + +%!demo +%! ## Show the 'prism' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap prism + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/rainbow.m --- a/scripts/image/rainbow.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/rainbow.m Thu Oct 22 13:27:00 2009 +0200 @@ -55,3 +55,10 @@ endif endfunction + +%!demo +%! ## Show the 'rainbow' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap rainbow + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/spring.m --- a/scripts/image/spring.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/spring.m Thu Oct 22 13:27:00 2009 +0200 @@ -50,3 +50,10 @@ endif endfunction + +%!demo +%! ## Show the 'spring' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap spring + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/summer.m --- a/scripts/image/summer.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/summer.m Thu Oct 22 13:27:00 2009 +0200 @@ -51,3 +51,10 @@ endif endfunction + +%!demo +%! ## Show the 'summer' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap summer + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/white.m --- a/scripts/image/white.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/white.m Thu Oct 22 13:27:00 2009 +0200 @@ -45,3 +45,10 @@ endif endfunction + +%!demo +%! ## Show the 'white' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap white + diff -r 584ca012b9e8 -r 9357d0e3d5e0 scripts/image/winter.m --- a/scripts/image/winter.m Tue Oct 20 20:22:10 2009 +0200 +++ b/scripts/image/winter.m Thu Oct 22 13:27:00 2009 +0200 @@ -51,3 +51,10 @@ endif endfunction + +%!demo +%! ## Show the 'winter' colormap as an image +%! image (1:64, linspace (0, 1, 64), repmat (1:64, 64, 1)') +%! axis ([1, 64, 0, 1], "ticy", "xy") +%! colormap winter +