Plotting Points on Map with Longitude and Latitude
조회 수: 43 (최근 30일)
이전 댓글 표시
Hello. I feel like this should be easy but I can't get it to work and I'm looking for some help. I have the latitude and longitude points for several staions throughout the state of Nebraska. I am trying to make a map of Nebraska and just have a dot at each station location. I already have the plot for the map of Nebraska given this
figure
usamap('Nebraska')
nebraskahi = shaperead('usastatehi', 'UseGeoCoords', true,...
'Selector',{@(name) strcmpi(name,'Nebraska'), 'Name'});
geoshow(nebraskahi, 'FaceColor', [0.3 1.0, 0.675])
I just need help adding a point to this. For instance, adding a point at the latitude 40.9394 and longitude -100.151. Thank you for your help!
댓글 수: 0
채택된 답변
dpb
2020년 6월 10일
I don't have the Mapping TB so can't test, but looks like just
hold on
lat= 40.9394;
lon=-100.151;
plotm(lat,lon,'r*')
would put a red asterisk at desired location.
plotm draws the latitude, longitude vectors given similar to plot for 2D graphics.
If you don't use a line as part of the linestyle argument, then you can just put the list of places in a vector pair or 2D array.
추가 답변 (0개)
참고 항목
카테고리
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!