Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

degaxis

axis with degrees


Description

draw axes on a plot using degree symbols in numbers

Usage

degAxis(side, at, labels, ...)

Arguments

side

integer; see axis

at

numeric; if missing, axTicks is called for nice values; see axis

labels

character; if omitted labels are constructed with degree symbols, ending in N/S/E/W; in case of negative degrees, sign is reversed and S or W is added; see axis

...

passed to the actual axis call

Value

axis is plotted on current graph

Note

decimal degrees are used if variation is small, instead of minutes and seconds

Examples

xy = cbind(x = 2 * runif(100) - 1, y = 2 * runif(100) - 1)
plot(SpatialPoints(xy, proj4string = CRS("+proj=longlat +ellps=WGS84")),xlim=c(-1,1),ylim=c(-1,1))
degAxis(1)
degAxis(2, at = c(-1,-0.5,0,0.5,1))
#

sp

Classes and Methods for Spatial Data

v1.4-5
GPL (>= 2)
Authors
Edzer Pebesma [aut, cre], Roger Bivand [aut], Barry Rowlingson [ctb], Virgilio Gomez-Rubio [ctb], Robert Hijmans [ctb], Michael Sumner [ctb], Don MacQueen [ctb], Jim Lemon [ctb], Finn Lindgren [ctb], Josh O'Brien [ctb], Joseph O'Rourke [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.