How to mark labels on sampling points
Show older comments
Dear all,
I have a data set with latitude, longitude and sample numeber. I can plot lat and lon in map. My question is how to display sample number on the plot. I will add data set and sample number for your reference
Answers (1)
I have no idea what you want to plot.
Try this —
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1091375/locations.csv')
figure
plot(T1{:,2}, T1{:,4},'.-')
txtstr = compose('%3d',T1{:,1}); % First Column Cell Array Of Strings
text(T1{:,2}, T1{:,4},txtstr)
Make appropriate changes to get the desired result.
.
2 Comments
Udaya
on 11 Aug 2022
Star Strider
on 11 Aug 2022
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!