How I can add marker names with plot function?
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
sermet
il 5 Mag 2016
Risposto: Alessandro Masullo
il 5 Mag 2016
station_id={'abcd','brmu','vcfd','mnnn'};
lon = [ 2.3349 12.878 8.6649 13.066 ];
lat = [ 48.835 49.1442 50.0906 52.3792 ];
plot(lon,lat,'.r','MarkerSize',20,'Marker','o', 'MarkerFaceColor', 'blue')
xlabel('Longtitude')
ylabel('Latitude')
title('STATIONS')
I need to add "station_id" for each marker in the plot figure.
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 5 Mag 2016
Modificato: Azzi Abdelmalek
il 5 Mag 2016
for k=1:numel(station_id)
text(lon(k)+0.5,lat(k),station_id{k})
end
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!