Misaligned contour and base map
3 ビュー (過去 30 日間)
古いコメントを表示
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
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 Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!