imshow breaks after changing uiaxes limits
Afficher commentaires plus anciens
I wanted to plot a figure and then replace it with an image at a later time. The following code runs perfectly fine:
ax = uiaxes;
currentimage = imread(imagepath);
imshow(currentimage, 'Parent', ax);
but as soon as i try to change the limits of one of the axes before showing the image
ax.XLim = [0.002 .02];
the figure doesn't show. I just have a blank figure window.
One workaround is to not use uiaxes (just using ax = axes works fine), but I was working on an app in AppDesigner so it would be nice. Another I thought might be to just hide the axes and create new ones? Either way it was frustrating working out how one little change broke my program...
Is this a bug? What's happening?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
