Misaligned contour and base map

1 vue (au cours des 30 derniers jours)
P3tra_
P3tra_ le 6 Fév 2019
Commenté : Ankit Dutta le 18 Fév 2019
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 commentaire
Ankit Dutta
Ankit Dutta le 18 Fév 2019
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?

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by