Misaligned contour and base map

3 Ansichten (letzte 30 Tage)
P3tra_
P3tra_ am 6 Feb. 2019
Kommentiert: Ankit Dutta am 18 Feb. 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 Kommentar
Ankit Dutta
Ankit Dutta am 18 Feb. 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by