How to plot so that its figure window doesn't become on top?

Can any body suggest me a way to plot a given array so that its figure window does not become on top of the other windows?
Actually I want to plot a variable array in a loop and see the changes whenever I want. But using simple plot() statement, the current figure becomes continuously on top of the other windows and this annoys.
Thanks

 採用された回答

Walter Roberson
Walter Roberson 2011 年 7 月 13 日

0 投票

Instead of using
figure(FigureNumber)
use
set(0,'CurrentFigure',FigureNumber)

その他の回答 (3 件)

Titus Edelhofer
Titus Edelhofer 2011 年 7 月 13 日

2 投票

Hi,
if you replace data in the plot, the figure doesn't come to the top:
% plot sin curve:
h = plot(sin(0:0.01:2*pi));
% open another figure on top:
figure
% please move top window slightly so that you can see the figure below
pause(5)
% update data ...
set(h, 'ydata', cos(0:0.01:2*pi));
Titus
Daniel Shub
Daniel Shub 2011 年 7 月 13 日

1 投票

You must have some extra code you are not telling us about. The plot function will generally plot into the current axis. I don't see how the current axis is not going to be from the topmost figure...
What you want to do is provide plot with an axis handle.
plot(hax, x, y)
Paulo Silva
Paulo Silva 2011 年 7 月 13 日

0 投票

f=figure %create a new figure
set(f,'Visible','off') %hide the figure
Just when you want to see the figure
set(f,'Visible','on')

1 件のコメント

David Mason
David Mason 2011 年 7 月 13 日
Paulo, thanks for the answer; but it seems not to be a good approach.
I'd like it to be similar to other OS windows. e.g. when I want to see a given window on top, the changing window is should be accessible(visible) and when I want I switch that window to be on top.
Others comments are welcome.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by