create_orientation_arrow: Create orientation arrow.

View source: R/legendMap.R

create_orientation_arrowR Documentation

Create orientation arrow.

Description

Function from 3wen/legendMap repo for 'adding a North arrow and/or a scale bar to maps done using ggplot2'. All credit for this function goes to Ewen Gallic. All notation and documentation is from Ewen Gallic.

This function creates an orientation arrow (i.e. north arrow). See https://github.com/3wen/legendMap.git for examples.

Usage

create_orientation_arrow(scale_bar, length, distance = 1, dist_units = "km")

Arguments

scale_bar

Result of create_scale_bar()

length

Desired length of the arrow

distance

Distance between legend rectangles and the bottom of the arrow. Default is 1.

dist_units

Units of distance "km" (kilometers) (default), "nm" (nautical miles), "mi" (statute miles).

Value

Return a list whose elements are; 'res': coordinates to draw an arrow, and 'coords_n': coordinates of the middle of the arrow (where the "N" will be plotted).

Source

https://github.com/3wen/legendMap.git


paulhegedus/OFPE documentation built on Nov. 23, 2022, 5:09 a.m.