Skip to Main Content Skip to Search
Product Documentation

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:

  1. To illustrate the use of north arrows, create a map centered at the South Pole and add a north arrow symbol at a specified geographic position:

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

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

  3. Drag the north arrow back to the top left corner.

  4. 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.

  5. 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])

  6. Make three more north arrows, to show that from the South Pole, every direction is north:

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS