MATLAB: Can’t set the current figure inside a function

currentfigurefigure properties

Hi. I have encountered the following problem: I use a GUI and in the Callback function create new figure, which, obviously, appears at the top of the previous one. However, I need to make the old figure to appear on top, but setting
set(0,'CurrentFigure',old_figure)
at the end of callback function does not work for some reason, i.e. new figure still appears on top (which is little inconvenient for my case). Any suggestions?

Best Answer

figure(old_figure)
should raise it and make it current. Setting the current figure is, as best I recall, defined to not raise it.
Related Question