Plotting a multidimensional variable/matrix on a shapefile?

Does anyone know how I can plot a multidimensional variable (rainfall) on a shapefile (country shp) so I can view the spatial distribution of the variable. I tried the code below, but it didn't worked as expected. The image didn't cover the entire area of the shapefile despite all analysis done was to the shape file extent.
Nig=worldmap('Nigeria');
S=shaperead('NGN.shp','UseGeoCoords',true);
set(Nig,'Visible','off')
latlim=getm(Nig,'MapLatlimit');
lonlim=getm(Nig,'MapLonlimit');
geoshow(Nig,S,'FaceColor',[1 1 1]);
%Nigeria meshgrid
NGlon_model = 5:1:13;
NGlat_model = 4:1:15;
NGlat_model = flipud(NGlat_model');
% Create grid
[NGlon,NGlat] = meshgrid(NGlon_model,NGlat_model);
Rain=RegFP;
geoshow(NGlat,NGlon,(RegFP(:,:,102)),'displaytype','texturemap');
load coastlines
[csrlatcells, csrloncells] = polysplit(coastlat, coastlon);
plotm(coastlat, coastlon,'k')

1 件のコメント

KSSV
KSSV 2018 年 7 月 18 日
Attach your shape file..so that people can help you.

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

回答 (0 件)

タグ

質問済み:

2018 年 7 月 18 日

コメント済み:

2018 年 7 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by