Matlab map show function - adjusting x and y-axis issue.
9 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Raheel Naveed
2023-7-25
daspect([1 1 1])
Add the command after adjusting the axis limits in each subplot
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!