changeset 11308:9a08fa5b33bd

image.m: Only flip y-axis if nextplot property equal "replace".
author Ben Abbott <bpabbott@mac.com>
date Thu, 02 Dec 2010 19:27:13 -0500
parents 6ab93f01df07
children d800fc6bd067
files scripts/ChangeLog scripts/image/image.m
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Dec 02 19:23:01 2010 -0500
+++ b/scripts/ChangeLog	Thu Dec 02 19:27:13 2010 -0500
@@ -1,5 +1,6 @@
 2010-12-02  Ben Abbott <bpabbott@mac.com>
 
+	* image/image.m: Only flip y-axis if nextplot property equal "replace".
 	* plot/contour3.m: Modify demo to avoid clipping mesh.
 	* plot/fill.m: Allow multiple filled polygons.
 	* plot/subplot.m: Add suppport for "align" and "replace" options.
--- a/scripts/image/image.m	Thu Dec 02 19:23:01 2010 -0500
+++ b/scripts/image/image.m	Thu Dec 02 19:27:13 2010 -0500
@@ -153,8 +153,10 @@
 
   set (ca, "view", [0, 90]);
 
-  # Always reverse y-axis for images, even on existing plots
-  set (ca, "ydir", "reverse");
+  if (strcmp (get (ca, "nextplot"), "replace"))
+    # Always reverse y-axis for images, unless hold is on
+    set (ca, "ydir", "reverse");
+  endif
 
   if (nargout > 0)
     h = tmp;