How can I adjust the patch function to display correctly?
3 次查看(过去 30 天)
显示 更早的评论
I want to display Wetlands data from the US Fish and Wildlife Service Wetlands Mapping page but I have been running in circles trying to figure out how to map it. I've gotten a display from using patch, but it is clearly incorrect. I do have multiple polygons, but again, not sure how to get them to display correctly. When I try geoshow('CA_Riparian.shp') I get nothing. Could someone help me modify my patch function to get it to display properly? The data can be found here: https://www.fws.gov/wetlands/Data/Data-Download.html
gx = geoaxes;
cali = shaperead('usastatehi.shp', 'UseGeoCoords', true, 'Selector',{@(name) strcmpi(name, 'California'), 'Name'});
lat = cali.Lat;
lon = cali.Lon;
geoplot(gx, lat,lon)
geobasemap(gx,'landcover')
land = shaperead('CA_Riparian.shp', 'UseGeoCoords',true);
ax2 = axes;
latW = land.Lat;
lonW = land.Lon;
patch(ax2,latW,lonW,'red','FaceAlpha',.4)
ax2.Visible = 'off';
ax2.XTick = [];
ax2.YTick = [];

Thank you!
0 个评论
回答(1 个)
Steven Lord
2021-11-26
I'm not sure patch is the right tool for this job. Have you tried using geoplot or perhaps patchm from Mapping Toolbox instead?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geographic Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

