How to disable figure pop up while initializing hggroup?

1 回表示 (過去 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 Center および File ExchangeColormaps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by