making a figure always on top

278 views (last 30 days)
mohammad on 17 Sep 2011
Answered: Adam Danz on 10 May 2021
how could a figure be always on top of other windows?

Accepted Answer

Wayne King
Wayne King on 17 Sep 2011
If you have a handle to a figure.
h1 = figure;
And after you create subsequent plots, you call:
That will raise the figure above all others.
mohammad on 18 Sep 2011
but it's needed when i use same plot command, it plots in the same figure window and not another figure window

Sign in to comment.

More Answers (2)

Igor on 18 Jun 2013
If you need to make a figure ALWAYS on top, try this.

Adam Danz
Adam Danz on 10 May 2021
Update (10 years later)
Starting in Matlab R2021a you can set figures created by uifigure to always be on top of other windows.
uifig = uifigure('WindowStyle','alwaysontop');
uifig = uifigure();
uifig.WindowStyle = 'alwaysontop';
Unlike the modal option, other windows are still accessible.
For more info,

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!