subplot - how to have the same aspect ratio ?

7 visualizaciones (últimos 30 días)
RuiQi
RuiQi el 16 de Mayo de 2017
Respondida: Walter Roberson el 16 de Mayo de 2017
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)')

Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de Mayo de 2017
After the imagesc() call
axis image

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by