# HG changeset patch # User Rik # Date 1274659910 25200 # Node ID bc4eb29e0cb4bf92005a13816aa469f6e8e227da # Parent 5c6b73a844e4e15b49ed0af7d4d46d6d43833166 Scale image point color according to colormap. Bug #29926. diff -r 5c6b73a844e4 -r bc4eb29e0cb4 scripts/ChangeLog --- a/scripts/ChangeLog Thu May 20 11:49:42 2010 -0700 +++ b/scripts/ChangeLog Sun May 23 17:11:50 2010 -0700 @@ -1,3 +1,8 @@ +2010-05-23 Rik + + * image/imshow.m: Scale image point color according to colormap. + Bug #29926. + 2010-05-16 Rik * plot/semilogx.m, plot/semilogy.m: Plot minor ticks for semilog plots. diff -r 5c6b73a844e4 -r bc4eb29e0cb4 scripts/image/imshow.m --- a/scripts/image/imshow.m Thu May 20 11:49:42 2010 -0700 +++ b/scripts/image/imshow.m Sun May 23 17:11:50 2010 -0700 @@ -64,7 +64,6 @@ ## Get the image. if (ischar (im)) - ## Eventually, this should be imread. [im, map] = imread (im); indexed = true; colormap (map); @@ -165,7 +164,8 @@ if (true_color || indexed) tmp = image ([], [], im); else - tmp = image (round ((rows (colormap ()) - 1) * im)); + tmp = image (im); + set (tmp, "cdatamapping", "scaled"); endif set (gca (), "visible", "off"); axis ("image");