Mercurial > hg > octave-terminal
changeset 10648:bc4eb29e0cb4
Scale image point color according to colormap. Bug #29926.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 23 May 2010 17:11:50 -0700 |
parents | 5c6b73a844e4 |
children | 64472dd48517 |
files | scripts/ChangeLog scripts/image/imshow.m |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-05-23 Rik <octave@nomad.inbox5.com> + + * image/imshow.m: Scale image point color according to colormap. + Bug #29926. + 2010-05-16 Rik <octave@nomad.inbox5.com> * plot/semilogx.m, plot/semilogy.m: Plot minor ticks for semilog plots.
--- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -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");