diff scripts/plot/patch.m @ 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 e81ddf9cacd5
children e9f6a6edec42
line wrap: on
line diff
--- a/scripts/plot/patch.m
+++ b/scripts/plot/patch.m
@@ -172,3 +172,15 @@
 %! unwind_protect_cleanup
 %!   close (hf);
 %! end_unwind_protect
+
+%!test
+%! hf = figure ("visible", "off");
+%! c = 0.9;
+%! unwind_protect
+%!   h = patch ([0 1 0], [0 1 1], c);
+%!   assert (get (gca, "clim"), [c - 1, c + 1]);
+%!   h = patch ([0 1 0], [0 1 1], 2 * c);
+%!   assert (get (gca, "clim"), [c, 2 * c]);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
\ No newline at end of file