spatial.plot: Simple wrapper around symbols to visualize spatial data

View source: R/utilities.R

spatial.plotR Documentation

Simple wrapper around symbols to visualize spatial data

Description

spatial.plot is a quick function to visualize spatial data using bubble plots

Usage

spatial.plot(x, y, z, ctr = TRUE, add = FALSE, inches = 0.2, ...)

Arguments

x

vector of length n representing the x coordinates.

y

vector of length n representing the y coordinates.

z

vector of n representing the observation at each location.

ctr

If TRUE, observations will be centered before plotting (zero-sized symbols represents average observations); if FALSE, the original observations are used.

add

If TRUE, a lisa-plot will be added to a pre-existing plot.

inches

scales the size of the symbols

...

other arguments

Details

This is a simple function to visualize spatial data. Positive (or above average) observations are shown by red circles, Negative (or below average) observations are shown as black squares. For hot/coldspot analysis using Local indicators of spatial association use lisa.

Value

A bubble-plot of the spatial data is produced.

Author(s)

Ottar N. Bjornstad onb1@psu.edu

References

Ripley, B.D. (1987). Stochastic Simulation. Wiley.

See Also

lisa

Examples

# first generate some sample data
x <- expand.grid(1:20, 1:5)[, 1]
y <- expand.grid(1:20, 1:5)[, 2]

# z data from an exponential random field
z <- rmvn.spa(x = x, y = y, p = 2, method = "gaus")

# plot data
## Not run: spatial.plot(x = x, y = y, z = z, ctr = FALSE)

bjornsta/ncf documentation built on June 3, 2022, 11:43 a.m.