Is there a way to tell matlab that set(gcf,'Visible','off') actually means don't show figures?

조회 수: 21 (최근 30일)
Unfortunately my code is sufficiently complex that I can't provide an MWE, but when I turn gcf Visibility off, using `set(gcf,'Visible','off') ` and then create a patch object, the patch object flashes on for an instant then turns off again. This is a problem, since I'm creating a large number of patch objects. Is there some command that actually turns Visibility off rather than flashing the patch on and off?
Thanks!
  댓글 수: 4
Leo Simon
Leo Simon 2020년 10월 23일
Thanks to both for quick responses. Ameer, I tried `opengl software` and it didn't make any difference. Walter, I'm afraid I don't understand your answer. What do you mean by "recording the figure handle" and when should I provide it? Apropos of "as early as possible," my code begins with the command `set(groot,'DefaultFigureVisible','off') `which I thought was supposed to turn visbility off for all figures, but it doesn't.
I looked at the two entries under the always-parent tag, but couldn't see the connection to my problem, probably I'm being dumb.
Bruno Luong
Bruno Luong 2020년 10월 23일
편집: Bruno Luong 2020년 10월 23일
Can't reproduce what you post, I don't see any flash with this code
clear
close all
h=figure;
fprintf('Type Ctrl C when you have enough\n')
set(h,'Visible','off')
ax=axes(h);
while true
surf(ax,peaks);
pause(0.1);
end
What is your minimal working example code? It leads nowhere if you can't provide MWE.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by