plot.spscan: Plots object from 'spscan.test'.

View source: R/plot.spscan.R

plot.spscanR Documentation

Plots object from spscan.test.

Description

Plots object of class scan from spscan.test.

Usage

## S3 method for class 'spscan'
plot(x, ..., nv = 100, border = NULL, ccol = NULL, clty = NULL, clwd = NULL)

Arguments

x

An object of class spscan.

...

Additional graphical parameters passed to the plot.ppp function.

nv

The number of vertices when drawing the cluster circles. Default is 100.

border

The border color of the circle. Default is NULL, meaning black.

ccol

Fill color of the circles. Default is NULL, indicating empty.

clty

Line type of circles. Default is NULL, indicting lty = 1.

clwd

Line width of circles. Default is NULL, indicating lwd = 2 for the most likely cluster and lwd = 1 for the rest.

Details

If border, ccol, clty, or clwd are specified, then the length of these vectors must match nrow(x$coords).

See Also

plot.ppp, draw.circle

Examples

data(grave)
out = spscan.test(grave, case = 2, alpha = 0.1, nsim = 49)
plot(out, chars = c(1, 20), main = "most likely cluster",
     border = "orange", ccol = NA)
# change color, lty, lwd of circles
set.seed(2)
out2 = spscan.test(grave, case = 2, alpha = 0.8, nsim = 49)
plot(out2, chars = c(1, 20),  border = "blue")
plot(out2, chars = c(1, 20),  border = c("blue", "orange"),
     clwd = c(3, 2), clty = c(2, 3))

smacpod documentation built on Sept. 22, 2023, 1:06 a.m.

Related to plot.spscan in smacpod...