How to insert geographical map under other grid data map

3 ビュー (過去 30 日間)
Thao Linh Tran
Thao Linh Tran 2018 年 9 月 22 日
コメント済み: Thao Linh Tran 2019 年 1 月 14 日
I have a grid of data including 208 columns, 168 rows then I plotted some grid points (the attachment). I would like to insert a geographical map underneath (latitude: 10 - 52 degree, longtitude: 120 - 172) so that the grid borders lies exactly on the area of the geographical map and the x,y axis show values of lattitude and longtitude. How can I do that? Many thanks in advance
  2 件のコメント
jonas
jonas 2018 年 9 月 23 日
編集済み: jonas 2018 年 9 月 23 日
You have the mapping toolbox? what kind of map you looking to overlay your data on? Country borders? Land borders? Some city?
Thao Linh Tran
Thao Linh Tran 2018 年 9 月 23 日
Thank you for your help. Yes, I have mapping toolbox and I would like to insert a map with country borders.

サインインしてコメントする。

採用された回答

jonas
jonas 2018 年 9 月 24 日
編集済み: jonas 2018 年 9 月 24 日
First you need a shapefile. You can find shapefiles on different places on the web. I've found naturalearthdata.com to work great for country borders. I've used the one called "Admin 0 - Boundary lines", so I can vouch for it. Just download the 10MB file and put the unzipped folder in your MATLAB path.
Drawing shapefile:
Borders_shp=shaperead('ne_10m_admin_0_countries.shp')
LandBorders=geoshow(gca,[Borders_shp.Y],[Borders_shp.X],'color',[0.3 0.3 0.3],'linewidth',0.25);
Overlay your data (denoted x & y):
h=geoshow(gca, x,y,'DisplayType', 'multipoint');
or if you want the color of your markers to describe some z-data, use this instead:
scatterm(x,y,[],z)
Set the axes limits already when you create your frame. For example:
axesm('mercator',...
'FLatLimit',[10 52],...
'FLonLimit',[120 172])
  1 件のコメント
Thao Linh Tran
Thao Linh Tran 2019 年 1 月 14 日
Thank you for your support

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMap Display についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by