geolegend: Put a legend on a plot in the geo series.

Description Usage Arguments Details Value Side Effects See Also Examples

View source: R/geolegend.R

Description

Adds a legend to current plot. The location can be specified with \$lat and \$lon. Allows all the same parameters as legend.

Usage

1

Arguments

pos

The position of the text, should include \$lat and \$lon. If \$lat and \$lon are llength 1, they determine the top left corner of the rectangle; if theey are length 2 vectors, the give opposite corners of the rectangular area. A list containing x and y values may be supplied.

legend

Vector of character strings to be associated with plot.

...

The function allows any optional argument to the legend function to be taken.

Details

See legend.

Value

None.

Side Effects

Draws a box at specified coordinates and puts inside (if possible) examples of lin, points, marks and/or shading, each identified with a user-specified text string.

See Also

legend.

Examples

1
2
3
4
5
6
7
8
9
# The function is currently defined as
       function(pos, legend, ...)
       {
                      oldpar <- par()
                      par(geopar$gpar)
                      on.exit(par(oldpar))
                      xx <- Proj(pos$lat, pos$lon)
                      legend(xx$x, xx$y, legend = legend, ...)
       }

geo documentation built on May 29, 2017, 5:36 p.m.