making a figure always on top

164 visualizzazioni (ultimi 30 giorni)
mohammad
mohammad il 17 Set 2011
Risposto: Adam Danz il 10 Mag 2021
how could a figure be always on top of other windows?

Risposta accettata

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

Accedi per commentare.

Più risposte (2)

Adam Danz
Adam Danz il 10 Mag 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');
or
uifig = uifigure();
uifig.WindowStyle = 'alwaysontop';
Unlike the modal option, other windows are still accessible.
For more info,

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

Categorie

Scopri di più su Develop uifigure-Based Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by