Restack objects within map axes

restack will be removed in a future release. Use uistack instead.




restack(h,position) changes the stacking position of the object h within the axes. h can be a handle, a vector of handles to graphics objects, or a name string recognized by handlem. Recognized position strings are 'top', 'bottom', 'bot', 'up', or 'down'.


Restack the great lakes to lie on top of conus:

figure; axesm miller
load conus
h = geoshow(gtlakelat, gtlakelon,...
    'DisplayType', 'polygon', 'FaceColor', 'cyan');
geoshow(uslat, uslon,...
    'DisplayType', 'polygon', 'FaceColor', [0.6 0.3 0.8])
% The great lakes were plotted first but need to be on top
% Cast handle to great lakes object to double in call to RESTACK

More About

expand all


This function is the command line equivalent of the stacking buttons in the mobjects graphical user interface. The stacking order is the order of the children of the axes.

See Also

Was this topic helpful?