send an object to the back of a figure window in matlab

You can use the uistack function in MATLAB to send an object to the back of a figure window.

For example, if you have a line object with handle hLine that you want to send to the back of the figure window:

main.m
uistack(hLine, 'bottom');
26 chars
2 lines

This will move the line object to the bottom layer of the figure window, so that it is behind all other graphics objects in the window.

Alternatively, you can also use the 'up' or 'down' arguments with uistack to move objects up or down in the layer order relative to their current position.

main.m
uistack(hLine, 'up'); %moves the object up one layer
uistack(hLine, 'down'); %moves the object down one layer
110 chars
3 lines

related categories

gistlibby LogSnag