subplot - how to have the same aspect ratio ?

조회 수: 8 (최근 30일)
RuiQi
RuiQi 2017년 5월 16일
답변: Walter Roberson 2017년 5월 16일
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일
After the imagesc() call
axis image

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by