Global map based on data from a 3D matrix
4 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have a 3D data file with logitude, latitude, temperature. I need to plot the temperature on a global map.
size(lon)=360 x 1 size(lat)=180 x 1 size(temp) = 360 x 180 x 12
I got the map as below but confused in mapping the "temp" correctly.
worldmap('world')
load coastlines
plotm(coastlat,coastlon)
Please help me with this.
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 2 月 12 日
You have the problem that you have 2D data for each of 12 months. You can only plot data for one month at a time
contourm(lat, lon, temp(:,:,MonthNumber))
The exception to this would be that in theory you could choose to "hold on" and plot all of the months on top of each other, using a different contour line color each time.
cmap = colormap(parula(12));
hold on
for MonthNumber = 1 : 12
contourm(lat, lon, temp(:,:,MonthNumber), 'EdgeColor', cmap(MonthNumber));
end
hold off
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!