changeset 9751:2b0cc0b6db61

Add demos for colormap functions
author Soren Hauberg <hauberg@gmail.com>
date Thu, 22 Oct 2009 12:18:56 -0400
parents 7bf4f3d64955
children 51c21837686f
files scripts/ChangeLog scripts/image/autumn.m scripts/image/bone.m scripts/image/cool.m scripts/image/copper.m scripts/image/flag.m scripts/image/gmap40.m scripts/image/gray.m scripts/image/hot.m scripts/image/hsv.m scripts/image/jet.m scripts/image/ocean.m scripts/image/pink.m scripts/image/prism.m scripts/image/rainbow.m scripts/image/spring.m scripts/image/summer.m scripts/image/white.m scripts/image/winter.m
diffstat 19 files changed, 138 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/ChangeLog	Thu Oct 22 12:18:56 2009 -0400
@@ -1,3 +1,15 @@
+2009-10-22  Soren Hauberg  <hauberg@gmail.com>
+
+	* 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  <hauberg@gmail.com>
+ 
+ 	* general/interp2.m: improved error checking and support for bicubic
+
 2009-10-19  Soren Hauberg  <hauberg@gmail.com>
 
 	* io/strread.m, io/textread.m: New functions.
--- a/scripts/image/autumn.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/autumn.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/bone.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/bone.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/cool.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/cool.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/copper.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/copper.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/flag.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/flag.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/gmap40.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/gmap40.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/gray.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/gray.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/hot.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/hot.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/hsv.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/hsv.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/jet.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/jet.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/ocean.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/ocean.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/pink.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/pink.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/prism.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/prism.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/rainbow.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/rainbow.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/spring.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/spring.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/summer.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/summer.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/white.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/white.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+
--- a/scripts/image/winter.m	Wed Oct 21 11:13:33 2009 -0700
+++ b/scripts/image/winter.m	Thu Oct 22 12:18:56 2009 -0400
@@ -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
+