create_orientation_arrow | R Documentation |
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.
create_orientation_arrow(scale_bar, length, distance = 1, dist_units = "km")
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). |
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).
https://github.com/3wen/legendMap.git
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.