addAxis: Add Spatial Cardinal Directions to Axis Labels

View source: R/addAxis.R

addAxisR Documentation

Add Spatial Cardinal Directions to Axis Labels

Description

This function adds cardinal directions to axis labels in a map.

Usage

addAxis(side, at = axTicks(side), mgp = par()$mgp, digits = 0, ...)

Arguments

side

an integer between 1 (bottom x-Axis) and 4 (right y-Axis).

at

values on the axis to add labels.

mgp

customize axis positions. See par().

digits

number of digits of labels.

...

other parameters to pass to axis().

Author(s)

Nicolas CASAJUS, nicolas.casajus@gmail.com

Examples

maps::map()
addFrame(grid = TRUE, add = TRUE, width = 5)
addAxis(1)
addAxis(2, at = seq(-50, 50, 100), digits = 2)
addAxis(3, lwd = 0, lwd.ticks = 0.5)
addAxis(4, las = 1, col.axis = "red")


KevCaz/graphicsutils documentation built on Sept. 16, 2022, 10:05 a.m.