フィルターのクリア

Matlab map show function - adjusting x and y-axis issue.

1 回表示 (過去 30 日間)
peter huang
peter huang 2023 年 7 月 25 日
回答済み: Raheel Naveed 2023 年 7 月 25 日
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
Raheel Naveed 2023 年 7 月 25 日
daspect([1 1 1])
Add the command after adjusting the axis limits in each subplot

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by