uifigure alternatives for gcf, gcbf, gco, gcbo, gca, and any other legacy figure based functions
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, I was wondering if any alternatives that work with the new uifigure windows are being developed for gcf, gcbf, gco, gcbo, gca, and any other legacy functions that used to work with legacy figures (guihandles, for example).
0 commentaires
Réponses (1)
Walter Roberson
le 2 Juin 2023
I used to think that those functions simplify didn't apply to uifigure and children. However someone indicated that the real issue is that by default handle visibility is off for those, and that if you turn handle visibility on that the functions will work. I have not tested this.
1 commentaire
Abdou
le 1 Août 2024
Modifié(e) : Abdou
le 1 Août 2024
That's true! I tested it and it works:
>> fig = uifigure(HandleVisibility = 'on'), f = gcf
fig =
Figure with properties:
Number: []
Name: ''
Color: [0.9400 0.9400 0.9400]
Position: [680 458 560 420]
Units: 'pixels'
f =
Figure with properties:
Number: []
Name: ''
Color: [0.9400 0.9400 0.9400]
Position: [680 458 560 420]
Units: 'pixels'
The default value of HandleVisibility property of a uifigure is set to 'off' to prevent the Figure object from becoming the current figure (gcf) and to prevent functions from making unwanted changes to the UI. MATLAB defaults to using the gcf or gca functions to get the target object for an operation, but these functions depend on the HandleVisibility property of the parent figure being 'on'.
Voir également
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!