Mercurial > hg > octave-lyh
changeset 10704:0bcd17cad9d1
image.m: Flip data, rather than y-axis, for images. (bug #30033)
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 14 Jun 2010 11:27:58 -0700 |
parents | 5eb420d92307 |
children | d500acdcf2dd |
files | scripts/ChangeLog scripts/image/image.m |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-06-14 Rik <octave@nomad.inbox5.com> + + * plot/image.m: Flip data, rather than y-axis, for images. (bug #30033) + 2010-06-12 Ben Abbott <bpabbott@mac.com> * plot/scatter.m: New demo.
--- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -18,7 +18,7 @@ ## <http://www.gnu.org/licenses/>. ## -*- 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