Matlab map show function - adjusting x and y-axis issue.
Mostrar comentarios más antiguos
I used the "map show" function in Matlab to plot satellite aerial images. However, when I tried to adjust their x and y coordinates, I noticed that the aspect ratio of the two subplots became different.
How can I freely adjust my x and y coordinates without changing the aspect ratio of both plots?
clear all;clc;clf
set(gcf,'color','w')
%%
subplot(2 ,3,1)
mapshow boston.tif
title('raw fig')
subplot(2 ,3,2)
mapshow boston.tif
axis([766000 778000 2951300 2956000])
subplot(2 ,3,4)
mapshow boston.tif
title('raw fig')
%%
subplot(2 ,3,5)
mapshow boston.tif
axis([776000 778000 2951300 2956000])
Due to the large file size of the images, I am unable to upload them. Instead, I used built-in satellite photos from the Matlab toolkit as examples. I noticed that adjusting the xy aspect ratio of the images causes changes in the aspect ratio of the subplot's size.
Respuestas (1)
Raheel Naveed
el 25 de Jul. de 2023
daspect([1 1 1])
Add the command after adjusting the axis limits in each subplot
Categorías
Más información sobre Vector and Raster Map Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!