필터 지우기
필터 지우기

How to disable figure pop up while initializing hggroup?

조회 수: 2 (최근 30일)
Grzegorz Diaczek
Grzegorz Diaczek 2022년 5월 12일
답변: Voss 2022년 5월 13일
Hi,
I have a question, when i initialize a hggroup a figure pop up, setting visible to off in next line do not fix the problem. Do not know if there is a possability to disable the pop up of the figure, because it is annoying. Thanks for help.
hgfigures = hggroup;
hgfigures.Visible = 'off';
  댓글 수: 1
Grzegorz Diaczek
Grzegorz Diaczek 2022년 5월 12일
Using:
hgfigures = hggroup;
set(gcf,'Visible','off');
solved the problem.

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

답변 (1개)

Voss
Voss 2022년 5월 13일
hggroup() creates an hggroup in the current axes in the current figure.
If there is no current figure, then a new figure is created and made the current figure. If there is no current axes, then a new axes is created in the current figure and made the current axes. Finally, an hggroup is created.
If you want to create an hggroup in a new figure that's invisible, then create the invisible figure right before creating the hggroup:
figure('Visible','off'); % creates an invisible figure
my_group = hggroup(); % creates an axes then an hggroup
Better is to store handles to the graphics objects (figure, axes, etc.) you create and use the handles to specify where other objects belong:
my_fig = figure('Visible','off');
my_ax = axes(my_fig); % creates an axes in my_fig
my_group = hggroup(my_ax); % creates an hggroup in my_ax

카테고리

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