setting the position of an image in a figure?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have this small loop, that shows a 'text' UIcontrol . after a small pause it I change the text's visiblty, and want to load an image instead..
I use
while ii<num_of_rounds
set(a7,'Visible','on');
pause(plus_time);
set(a7,'Visible','off');
axes('Position',[.35 .3 .3 .3]);
image(imcell{1,b});
START_TIMER;
end.
I have two problems here-
1. matlab tells me that the
axes('Position',[.35 .3 .3 .3]);
takes too long and I should take it out from the loop- how can I do it, while still haveing the image in that position and without opening a new figure ( in an exsisting GUI)?
2 commentaires
Björn
le 15 Oct 2012
I would assume that the while-counter 'ii' should occur in the loop to make sure that the while-loop stops at a certain time. If it is just a single figure you want to plot, then I would think there is no need for a loop. Can you give a little more of the code so it can be more clear what happens in the loop?
Réponses (1)
Image Analyst
le 15 Oct 2012
Don't worry about it. The time is inconsequential. One thing to note is that your repeated calls to image stack up a bunch of images in the axes control so this loop will slow down as it goes. Put in a "cla" before "image" to clear out prior images. You might actually need the Position resizing code in there if it automatically resizes the control for each new image (which it will do unless you've set "hold on"), and you don't want that.
0 commentaires
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps 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!