Matlab map show function - adjusting x and y-axis issue.
이전 댓글 표시
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.
답변 (1개)
Raheel Naveed
2023년 7월 25일
daspect([1 1 1])
Add the command after adjusting the axis limits in each subplot
카테고리
도움말 센터 및 File Exchange에서 Vector and Raster Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!