imshow breaks after changing uiaxes limits
이전 댓글 표시
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?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
