Matlab map show function - adjusting x and y-axis issue.
7 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Raheel Naveed
on 25 Jul 2023
daspect([1 1 1])
Add the command after adjusting the axis limits in each subplot
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!