sizelegend: Magnitude size legend

Description Usage Arguments Details Value Author(s) Examples

View source: R/sizelegend.R

Description

Plot a simple legend of magnitude sizes at the top of a plot.

Usage

1
sizelegend(se, am, pch = pch)

Arguments

se

vector, sizes

am

vector, labels

pch

plotting character

Details

A box around the legend is currently introduced.

Value

Graphical Side Effect

Author(s)

Jonathan M. Lees<[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
x = rnorm(30)
y = rnorm(30)

mags = runif(30, 1,8)


plot(x, y, type="n")

esiz = exp(mags)
rsiz = RPMG::RESCALE(esiz, .4, 10, min(esiz), max(esiz))
points(x, y, pch=1, cex=rsiz)

am = pretty(mags)
am = am[am>min(mags) & am<max(mags) ]

em = exp(am)
se = RPMG::RESCALE(em, .4, 10, min(esiz), max(esiz))

sizelegend(se, am, pch=1)

GEOmap documentation built on May 30, 2017, 3:58 a.m.