Effacer les filtres
Effacer les filtres

How to disable figure pop up while initializing hggroup?

2 vues (au cours des 30 derniers jours)
Grzegorz Diaczek
Grzegorz Diaczek le 12 Mai 2022
Réponse apportée : Voss le 13 Mai 2022
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 commentaire
Grzegorz Diaczek
Grzegorz Diaczek le 12 Mai 2022
Using:
hgfigures = hggroup;
set(gcf,'Visible','off');
solved the problem.

Connectez-vous pour commenter.

Réponses (1)

Voss
Voss le 13 Mai 2022
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

Catégories

En savoir plus sur Graphics Object Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by