diff src/graphics.cc @ 13247:e36c2f4ea8f5

Set clim correctly for patch objects: src/graphics.cc: (update_axis_limits): set min_val correctly. scripts/plot/patch.m: test for this fix.
author Kai Habel <kai.habel@gmx.de>
date Thu, 29 Sep 2011 12:31:39 +0200
parents 8bb526fb3349
children 834f904a3dcb
line wrap: on
line diff
--- a/src/graphics.cc	Thu Sep 29 03:35:58 2011 -0400
+++ b/src/graphics.cc	Thu Sep 29 12:31:39 2011 +0200
@@ -5668,7 +5668,10 @@
               max_val = 1;
             }
           else if (min_val == max_val)
-            max_val = min_val + 1;
+            {
+              max_val = min_val + 1;
+              min_val -= 1;
+            }
 
           limits.resize (1, 2);
 
@@ -5829,7 +5832,10 @@
               max_val = 1;
             }
           else if (min_val == max_val)
-            max_val = min_val + 1;
+            {
+              max_val = min_val + 1;
+              min_val -= 1;
+            }
 
           limits.resize (1, 2);