# HG changeset patch # User Rik # Date 1276540078 25200 # Node ID 0bcd17cad9d134d2db6f3ce7a259755afc1c2e54 # Parent 5eb420d923077126b2d1e066734351b3d0559f80 image.m: Flip data, rather than y-axis, for images. (bug #30033) diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-06-14 Rik + + * plot/image.m: Flip data, rather than y-axis, for images. (bug #30033) + 2010-06-12 Ben Abbott * plot/scatter.m: New demo. diff --git a/scripts/image/image.m b/scripts/image/image.m --- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -18,7 +18,7 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {} image (@var{img}) +## @deftypefn {Function File} {} image (@var{img}) ## @deftypefnx {Function File} {} image (@var{x}, @var{y}, @var{img}) ## Display a matrix as a color image. The elements of @var{x} are indices ## into the current colormap, and the colormap will be scaled so that the @@ -115,7 +115,8 @@ ca = gca (); - tmp = __go_image__ (ca, "cdata", img, "xdata", xdata, "ydata", ydata, + tmp = __go_image__ (ca, "cdata", flipdim (img, 1), + "xdata", xdata, "ydata", ydata, "cdatamapping", "direct", varargin {:}); ## FIXME -- how can we do this and also get the {x,y}limmode @@ -137,10 +138,6 @@ set (ca, "view", [0, 90]); - if (strcmp (get (ca, "nextplot"), "replace")) - set (ca, "ydir", "reverse"); - endif - if (nargout > 0) h = tmp; endif