フィルターのクリア

Plotting Points on Map with Longitude and Latitude

17 ビュー (過去 30 日間)
Claire Hollow
Claire Hollow 2020 年 6 月 9 日
コメント済み: Claire Hollow 2020 年 6 月 10 日
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!

採用された回答

dpb
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.
  1 件のコメント
Claire Hollow
Claire Hollow 2020 年 6 月 10 日
Thank you, worked great!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by