How can I stop imagesc from opening empty figure windows in app designer ?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pierrekorda
le 25 Avr 2022
Modifié(e) : Pierrekorda
le 26 Avr 2022
Hello !
I'm currentlly having issues with the imagesc command. I use this function to display with specific coordinates an image behind a plot in a UIAxes. However, everytime the imagesc function is called, an additional and unwanted empty figure window is created. (The wanted image is correctly displayed where it should be though)
This is very similar to the behaviour when one forgets to give the handle of the UIAxes like by using:
hold on;
instead of
hold(app.UIAxes, "on");
The syntax I use is the following:
I = imread('image_name.PNG');
imagesc(app.UIAxes, [Xmin Xmax],[Ymin Ymax],I);
To be exact it is more like:
I = imread('image_name.PNG');
uistack(imagesc(app.UIAxes, [Xmin Xmax],[Ymin Ymax],I),'bottom');
But the presence of uistack does not change the behaviour described here.
Does someone have an idea? This is beginning to driving me crazy. Thank you !
0 commentaires
Réponse acceptée
Kevin Holly
le 25 Avr 2022
If you look at the documentation for uistack, it states, "The uistack function is not supported in App Designer or in apps created using the uifigure function. Instead, modify the stacking order of components in a container by setting the Children property of the container. For more information, see Change Front-to-Back Component Order."
3 commentaires
Kevin Holly
le 26 Avr 2022
Did you happen to rename your UIAxes?
I created an app in R2021b (see attached) and could not replicate the issue.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks 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!