Learn R Programming

ncf (version 1.2-2)

spatial.plot: 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=.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 observ 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

Value

A bubble-plot of the spatial data is produced.

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.

See Also

lisa

Examples

Run this code
# NOT RUN {
#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)
# }

Run the code above in your browser using DataLab