spatial.plot | R Documentation |
spatial.plot
is a quick function to visualize spatial data using bubble plots
spatial.plot(x, y, z, ctr = TRUE, add = FALSE, inches = 0.2, ...)
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 |
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
.
A bubble-plot of the spatial data is produced.
Ottar N. Bjornstad onb1@psu.edu
Ripley, B.D. (1987). Stochastic Simulation. Wiley.
lisa
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.