Plotting Points on Map with Longitude and Latitude
28 ビュー (過去 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 で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!