# HG changeset patch # User Ben Abbott # Date 1376345406 14400 # Node ID d9ca0f44f1e7d5dddcb544f59a94f0262e1d5f07 # Parent 8e196132bbea3d5b3a306b4635953539155250a7 Tests for order of axes when using subplot for the second time. * libinterp/corefcn/graphics.cc: Add test (bug # 39767). diff --git a/libinterp/corefcn/graphics.cc b/libinterp/corefcn/graphics.cc --- 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");