为什么图中的图像(由 imshow
绘制)在被另一个 imshow
更新时会改变其大小?
演示代码:
img = rand(100,100);
figure(1);
hold on;
imshow(img); % plot an image
pause(1); % pause for demonstrational reasons
imshow(img); % update the image
这只发生在第一次更新时。
最佳答案
图(1);采用默认大小,然后当您绘制 imshow(img) 后,保持大小相对于先前的图形 (1) 大小减小。
更好的方法是
img = rand(100,100);
figure, imshow(img); % plot an image
hold on;
pause(1); % pause for demonstrational reasons
imshow(img); % update the image
关于image - imshow 更新的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18204484/