Contourfm within bounding box
Show older comments
Hi,
I have a shapefile containing the coastline of my study region. I would like to spatially interpolate elevation such that all areas within the coastline, and not just the points where data is available, are filled.
Here is what I have so far. Something is definitely wrong. I can see the color bar and not the contour filled image as my output.
Please help. &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
figure
[LONG, LAT]=meshgrid(linspace(min(long),max(long)),linspace(min(lat),max(lat)));
F = TriScatteredInterp(long,lat,elev);
qz = F(LONG,LAT);
axesm('MapProjection','lambert', 'MapParallels',[],...
'MapLatLimit',[48 61], 'MapLonLimit',[-122 -89]+360)
geoshow('PrairiesBoundaries.shp', 'DisplayType','polygon','FaceColor','none', 'EdgeColor','none')
hold on
[cs,h]=contourfm(LONG,LAT,qz,'.b','LineWidth',1.3);
clabel(cs,h,'fontsize',12);
hcb = colorbar('horiz');
set(get(hcb,'Xlabel'),'String','elevation')
1 Comment
elvis asong ZILEFAC
on 3 Jul 2013
Answers (0)
Categories
Find more on Mapping Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!