Plotting Points on Map with Longitude and Latitude

30 views (last 30 days)
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!

Accepted Answer

dpb
dpb on 10 Jun 2020
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!