# HG changeset patch # User jwe # Date 1171569567 0 # Node ID cf8894bbc49d4b24c111873b91febc96068e1e20 # Parent 6a60e68fc4b1d79b22e9e860736bdf5ca4cc7e60 [project @ 2007-02-15 19:59:27 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2007-02-15 Daniel J Sebald + * image/imshow.m: Don't restore old colormap. + * plot/__uiobject_image_ctor__.m: Set xdata and ydata properties. * image/__img__.m: New file containing common parts of image.m and imshow.m. diff --git a/scripts/image/imshow.m b/scripts/image/imshow.m --- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -97,7 +97,7 @@ ## Set other default parameters. isindexed = false; initial_magnification = 100; - old_colormap = color_map = colormap (); + color_map = colormap (); ## Handle the rest of the arguments. narg = 1; @@ -149,9 +149,8 @@ dim = ndims (im); if (dim == 2) im = round ((size (color_map, 1) - 1) * im); + image (im, initial_magnification/100); colormap (color_map); - image (im, initial_magnification/100); - colormap (old_colormap); elseif (dim == 3 && size (im, 3) == 3) __img__ ([] , [], im); ## FIXME -- needed anymore for a special case? diff --git a/scripts/plot/__uiobject_draw_axes__.m b/scripts/plot/__uiobject_draw_axes__.m --- a/scripts/plot/__uiobject_draw_axes__.m +++ b/scripts/plot/__uiobject_draw_axes__.m @@ -47,7 +47,7 @@ endif if (strcmp (axis_obj.dataaspectratiomode, "manual")) - r = axis_obj.dataaspectratio + r = axis_obj.dataaspectratio; fprintf (plot_stream, "set size ratio %g;\n", -r(2)/r(1)); else fputs (plot_stream, "set size noratio;\n"); @@ -804,7 +804,7 @@ style = "lines"; if (isempty (lt)) if (! isempty (pt)) - style = "points" + style = "points"; endif elseif (! isempty (pt)) style = "linespoints";