How can I project my data onto a map?

조회 수: 4 (최근 30일)
greg
greg 2019년 7월 11일
답변: Yogesh Khurana 2019년 7월 24일
I have a variable that is 576x360 that I have been plotting using imagesc and then a mask overlayed to outline the continents but I am wondering if I can plot my data on a real map projection rather than a rectangle. I have tried worldmap but am a bit unsure about how to get my data onto the map. Any tips or reccomendations would be greatly appreciated.

답변 (1개)

Yogesh Khurana
Yogesh Khurana 2019년 7월 24일
To get the data onto the map you can use uistack. uistack is used to reorder visual stacking of UI components. Using this function, you can shift the specified component (map) to another position(bottom) in the stack.
Refer to the following example for the same:
x = 1:500;
y = sind(x);
plot(x,y,'linewidth',3)
axis tight;
hold on
I = imread('640px-WorldMap.png');
h = image(xlim,-ylim,I);
uistack(h,'bottom')
Output:
You can refer to uistack documentation for more details:

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by