image - Problems with imshow update -


why image in figure (ploted imshow) changing size when updated imshow?

demonstrational code:

img = rand(100,100); figure(1); hold on; imshow(img); % plot image pause(1);    % pause demonstrational reasons imshow(img); % update image 

this happening @ first update.

figure(1); takes default size , when plot imshow(img) after hold on size gets reduced relative previous figure(1) size.

better approach be

img = rand(100,100); figure, imshow(img); % plot image hold on; pause(1);    % pause demonstrational reasons imshow(img); % update image 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -