subplot - how to have the same aspect ratio ?

I am using subplot to imshow() a rgb image and imagesc() an integer array. Both matrices have the same rows and columns. I would like to know how I can 'reshape' both of them in the subplot so that they share the same original aspect ratio. Currently only the image drawn with imshow has the right aspect ratio.
figure;
subplot(1,2,1);
imshow(image_rgb);
subplot(1,2,2);
imagesc(reshape(idx,COLS,ROWS)')

 採用された回答

Walter Roberson
Walter Roberson 2017 年 5 月 16 日

3 投票

After the imagesc() call
axis image

その他の回答 (0 件)

タグ

質問済み:

2017 年 5 月 16 日

回答済み:

2017 年 5 月 16 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by