test plotcolorbar %!test %! close all %! unwind_protect %! plot (rand (10, 1)) %! colorbar; %! hax = gca (); %! positions = get (hax, "position"); %! outerpositions = get (hax, "outerposition"); %! looseinsets = get (hax, "looseinset"); %! tightinsets = get (hax, "tightinset"); %! plot(rand(10,1)) %! colorbar; %! 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) %! 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