Main Content

North Arrows

The north arrow element provides the orientation of a map by pointing to the geographic North Pole. You can use the northarrow function to display a symbol indicating the direction due north on the current map. The north arrow symbol can be repositioned by clicking and dragging its icon. The orientation of the north arrow is computed, and does not need manual adjustment no matter where you move the symbol. Ctrl+clicking the icon creates an input dialog box with which you can change the location of the north arrow:

Create a map centered at the South Pole. Add a north arrow symbol at a specified geographic position.

Antarctica = shaperead('landareas', 'UseGeoCoords', true, ...
    'Selector',{@(name) strcmpi(name,{'Antarctica'}), 'Name'});
worldmap('south pole')
northarrow('latitude', -57, 'longitude', 135);

Click and drag the north arrow symbol to another corner of the map. Note that it always points to the North Pole.

Drag the north arrow back to the top left corner.

Right-click or Ctrl+click the north arrow. The Inputs for North Arrow dialog opens, which lets you specify the line weight, edge and fill colors, and relative size of the arrow. Set some properties and click OK.

Also set some north arrow properties manually, just to get a feel for them.

h = handlem('NorthArrow');
set(h, 'FaceColor', [1.000 0.8431 0.0000],...
   'EdgeColor', [0.0100 0.0100 0.9000])

Make three more north arrows, to show that from the South Pole, every direction is north. Note: north arrows are created as objects in the MATLAB® axes (and thus have Cartesian coordinates), not as mapping objects. As a result, if you create more than one north arrow, any Mapping Toolbox™ function that manipulates a north arrow will affect only the last one drawn.

northarrow('latitude',-57,'longitude', 45);