Add coordinate points (latitude and longitude) on a figure

3 views (last 30 days)
Hi, I have the coordinates of some climate stations over a country in the coordinates.mat. The 3rd and 4th column of coordinates.mat represents latitude and longitude of each station. I need to show the locations of stations on the figure to understand the distribution of stations over the country.
here is the code that creates the country figure. NB: The borders function is taken from the MATLAB File Exchange
borders('Iran Islamic Republic of') % border is a 3rd party code from matlab file exchange
grid on
ax.GridLineStyle = '-';
% Modify the X and Y ticks positions
xticks(44:.5:65);
yticks(25:.5:40);
I attached coordinates.mat
Thank you very much

Accepted Answer

Adam Danz
Adam Danz on 17 Jan 2020
Edited: Adam Danz on 17 Jan 2020
hold on
plot(coordinates.lon, coordinates.lat, 'kx')
xlabel('Longitude')
ylabel('Latitude')

More Answers (0)

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!