Issue with figure display
13 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have used below command inside the for loop to avoid the display of figures. However, if I run some other command even in new editor page there is no figure display at all. And also, the new figures are always overlapping with the previous ones..
This problem is getting rectified only if I restart the Matlab..
I seriuosly don't know what's happening with this command,, Any help please ??
set(0,'DefaultFigureVisible','off')
0 件のコメント
採用された回答
Rik
2022 年 3 月 10 日
The command you posted will set the default visibility property to off. That means that a new figure that is created will have its visibility turned off. This setting affects every figure creation in Matlab.
You should change the code in your loop to create the figures with their visibility off instead.
If that is not possible, you should restore the default when you're done.
DefaultFigureVisible=get(0,'DefaultFigureVisible');
set(0,'DefaultFigureVisible','off')
% rest of your code
set(0,'DefaultFigureVisible',DefaultFigureVisible)
8 件のコメント
Rik
2022 年 3 月 10 日
That is what I suggested as well (as the preferred solution actually): if create new figures in your loop, you should set the Visible property then.
for n=1:10
f(n)=figure('Visible','off');
ax=axes('Parent',f(n));
plot(rand(10,1),'Parent',ax)
title(sprintf('n=%d',n))
end
set(f(randi(end)),'Visible','on')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!