- geoscatter: https://www.mathworks.com/help/matlab/ref/geoscatter.html
- geobasemap: https://www.mathworks.com/help/matlab/ref/geobasemap.html
- annotation: https://www.mathworks.com/help/matlab/ref/annotation.html
Adding northarrow to geoscatter plot
1 view (last 30 days)
Show older comments
How can I add a north arrow to a geoscatter plot?
0 Comments
Answers (1)
Abhipsa
on 18 Jun 2025
While "geoscatter" in MATLAB doesn't have a built-in "northarrow" function unlike "map axes", you can manually add a north arrow using "annotations" function.
% Dummy example of geoscatter
lat = [37.77 34.05 40.71];
lon = [-122.42 -118.24 -74.00];
geoscatter(lat, lon, 'filled')
geobasemap streets
% Position of arrow (normalized figure units)
% Get current figure position
fig = gcf;
ax = gca;
% Add north arrow in top-right corner of figure
%You can modify this as per your requirement
annotation('arrow', [0.85 0.85], [0.7 0.9], 'LineWidth', 2);
annotation('textbox', [0.84 0.91 0.05 0.05], 'String', 'N', ...
'EdgeColor', 'none', 'FontWeight', 'bold', 'FontSize', 12);
You can refer to the below MATLAB documentations for more details:
I hope this helps you.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!