changeset 17229:d9ca0f44f1e7

Tests for order of axes when using subplot for the second time. * libinterp/corefcn/graphics.cc: Add test (bug # 39767).
author Ben Abbott <bpabbott@mac.com>
date Mon, 12 Aug 2013 18:10:06 -0400
parents 8e196132bbea
children f95bb8763f4e
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc
+++ b/libinterp/corefcn/graphics.cc
@@ -4075,6 +4075,19 @@
 }
 
 /*
+%!xtest
+%! ## Doubling up on subplots results in axes out of order
+%! hf = figure ("visible", "off");
+%! graphics_toolkit (hf, "fltk");
+%! unwind_protect
+%!   subplot(2,1,1); plot(rand(10,1)); subplot(2,1,2); plot(rand(10,1));
+%!   subplot(2,1,1); plot(rand(10,1)); subplot(2,1,2); plot(rand(10,1));
+%!   hax = findall (gcf (), "type", "axes");
+%!   positions = cell2mat (get (hax, "position"));
+%!   assert (positions(1,2) > positions(2,2))
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
 %!test
 %! hf = figure ("visible", "off");
 %! graphics_toolkit (hf, "fltk");