test stefan %!test %! graphics_toolkit fltk %! % Adding `figure ("visible", "off")' changes the result %! close all %! unwind_protect %! plot (rand (10, 1)) %! hax = gca (); %! positions = get (hax, "position"); %! outerpositions = get (hax, "outerposition"); %! looseinsets = get (hax, "looseinset"); %! tightinsets = get (hax, "tightinset"); %! plot(rand(10,1)) %! hax = gca (); %! assert (get (hax, "position"), positions, 0.001) %! assert (get (hax, "outerposition"), outerpositions, 0.001) %! assert (get (hax, "looseinset"), looseinsets, 0.001) %! assert (get (hax, "tightinset"), tightinsets, 0.001) %! unwind_protect_cleanup %! close all; %! end_unwind_protect %!xtest %! graphics_toolkit fltk %! % Adding `figure ("visible", "off")' changes the result %! close all %! unwind_protect %! plot (rand (10, 1)) %! ## Adding drawnow () fixes the problem? %! drawnow () %! hax = gca (); %! positions = get (hax, "position"); %! outerpositions = get (hax, "outerposition"); %! looseinsets = get (hax, "looseinset"); %! tightinsets = get (hax, "tightinset"); %! plot(rand(10,1)) %! hax = gca (); %! assert (get (hax, "position"), positions, 0.001) %! assert (get (hax, "outerposition"), outerpositions, 0.001) %! assert (get (hax, "looseinset"), looseinsets, 0.001) %! assert (get (hax, "tightinset"), tightinsets, 0.001) %! unwind_protect_cleanup %! close all; %! end_unwind_protect