Misaligned contour and base map

1 次查看(过去 30 天)
P3tra_
P3tra_ 2019-2-6
Hi People,
I am tying to contour a variable over a base map in the polar region. Although they look fine seperately, they seemed to be misaligned when put together like the image here (if you open the image in another tap, you shall see all of it)
My code is like such:
xi = linspace(min(lon_6c),max(lon_6c), 1000) ;
yi = linspace(min(lat_6c),max(lat_6c), 1000) ;
[Xi,Yi] = meshgrid(xi,yi) ;
F = scatteredInterpolant(lon_6c,lat_6c,temp_6c,'natural') ;
Zi = F (Xi,Yi) ;
figure
hold on
m_coast('patch',[1 .6 .5]);
m_grid('box','fancy','tickdir','in');
contour(Xi,Yi,Zi)
Please help :3
  1 个评论
Ankit Dutta
Ankit Dutta 2019-2-18
The “contour” function is expected to map according to the x and y coordinates. From the images, it seems that –90 in the contour in Figure 3 is mapped to 90W on the base map in Figure 2. Since the contour is based on Xi, Yi inputs, is this the mapping that you are looking for?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by