How do I plot points on a map in with the mapping tool?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have the mapping toolbox function. I brought up a map of the U.S. with lat/lon axes. All I need to do now I plot points on the map where certain cities/areas are. It does not need to be exact (but preferred), so any type of brush or something would work. How do I do this?
Here is what I have so far:
figure; ax = usamap({'CA','ME'});
set(ax, 'Visible', 'off')
latlim = getm(ax, 'MapLatLimit');
lonlim = getm(ax, 'MapLonLimit');
states = shaperead('usastatehi',... 'UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(ax, states, 'FaceColor', [0.5 0.5 1])
lat = [states.LabelLat];
lon = [states.LabelLon];
tf = ingeoquad(lat, lon, latlim, lonlim);
textm(lat(tf), lon(tf)) ...
댓글 수: 1
Geoff Hayes
2014년 6월 11일
편집: Geoff Hayes
2014년 6월 11일
Duplicate with http://www.mathworks.com/matlabcentral/answers/133607-how-do-i-plot-points-on-a-map-in-matlab. Shane - please delete this one or the other.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!